Agent skill · Data & Analytics

structured-output-fabric

This skill should be used when the user requests "get JSON with fields X, Y, Z", "need JSON output from this text", "create structured JSON from", or provides a JSON schema they want extracted from input data. Use this for converting ANY text into structured JSON format.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill structured-output-fabric --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 8 KB
Bundled scripts: none
Version: 0.1.0
Path: skills/ai-llm/structured-output-fabric/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Text to Structured JSON Conversion This skill enables Claude to automatically convert any text into clean, structured JSON output when the user specifies desired JSON fields or structure. ## Purpose When users request structured data extraction (e.g., "I need JSON with name, tags, and summary from this text"), Claude executes an automated workflow to deliver clean JSON matching the requested schema. ## Scope **What this skill does:** - Converts ANY text input into structured JSON with specified fields - Accepts text from any source: files, API responses, command output, user input, or other tools - Generates prompts that enforce strict JSON-only output - Validates and cleans the resulting JSON **What this skill does NOT do:** - Does NOT decide which analysis patterns to use (pattern selection is outside this skill's scope) - Does NOT determine what fields to extract (user or calling skill specifies the schema) - Does NOT interpret or analyze content meaning (only structures it as JSON) ## Core Workflow Execute these steps automatically when the user requests structured JSON: ### 1. Parse JSON Requirements Identify from the request: - Desired JSON field names - Field types (string

What's inside
Steps it walks through
  1. Purpose
  2. Scope
  3. Core Workflow
  4. 1. Parse JSON Requirements
  5. 2. Generate Base Prompt
  6. 3. Improve Prompt with Fabric
  7. 4. Combine Prompt with Source Text
  8. 5. Execute with Fabric rawquery
  9. 6. Extract and Validate Clean JSON
  10. Example User Interactions
  11. Example 1: Converting Log Output to JSON
  12. Example 2: Nested Structure from API Response
  13. Example 3: With Constraints from File Content
  14. Using the Provided Scripts
Ships with 1 file
  • metadata.json
Commands it runs
cat base_prompt.txt | fabric -p improve_prompt -o improved_prompt.txt >/dev/null 2>&1
cat full_input.txt | fabric -p raw_query -m claude-3-5-haiku-latest -o output.txt >/dev/null 2>&1
bash scripts/extract_json_from_llm.sh output.txt > clean.json
if jq '.' clean.json >/dev/null 2>&1; then
cat clean.json
else
fi
bash scripts/extract_json_from_llm.sh fabric_output.txt > clean.json
cat fabric_output.txt | bash scripts/extract_json_from_llm.sh > clean.json
cat > /tmp/base.txt << 'EOF'
More from claude-skill-registry
All skills →
About this skill
What does the structured-output-fabric skill do?

This skill should be used when the user requests "get JSON with fields X, Y, Z", "need JSON output from this text", "create structured JSON from", or provides a JSON schema they want extracted from input data. Use this for converting ANY text into structured JSON format.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill structured-output-fabric --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going