add-synthesis-fixture
Skill8 starsChanged 7 months agoApache-2.0View on GitHub
output.json is a derived file — it is the jq -s '.[0] * .[1]' merge of output-docs.json and output-tooling.json. Never edit output.json directly. After any change to either pass fixture, always re-merge. Skill entries in output-tooling.json must have: - No angle brackets in description fields - name in kebab-case - Valid SKILL.md content as a JSON string (use \n for newlines) Example skill entry: Hook entries must maintain the 1:1 hooks-to-settings_hooks relationship: After editing either pass fixture: Angle brackets in…
In this repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- lib/CLAUDE.mdCLAUDE.md
- prompts/CLAUDE.mdCLAUDE.md
- schemas/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- add-bats-testSkill
- add-edge-testSkill
- add-gather-agentSkill
- add-integration-testSkill
- audit-prompt-schema-syncSkill
- bundle-and-verifySkill
- check-ci-locallySkill
- debug-agent-failureSkill
- fixture-syncSkill
- pre-pr-checklistSkill
- rebuild-test-imageSkill
- release-ultrainitSkill
- run-testsSkill
- tune-synthesis-contextSkill
- validate-generated-artifactSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
No angle brackets in description fields
- Distinctive: line 59
After editing either pass fixture:
- Very specific: line 78
Check tests/unit/merge.bats and tests/integration/synthesize_phase.bats for assertions on skill count, specific field values, or hook count …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Before You Start
tests/fixtures/synthesis/output-docs.json— Pass 1 output (CLAUDE.md content)tests/fixtures/synthesis/output-tooling.json— Pass 2 output (skills, hooks, MCP)tests/fixtures/synthesis/output.json— derived merged file (DO NOT edit directly)schemas/synthesis-docs.jsonandschemas/synthesis-tooling.json— the output contractstests/unit/merge.bats— tests that read fromoutput.jsondirectly
Critical Rule
output.json is a derived file — it is the jq -s '.[0] * .[1]' merge of output-docs.json and output-tooling.json. Never edit output.json directly. After any change to either pass fixture, always re-merge.
Steps
1. Identify which pass owns the new field
- Pass 1 (
output-docs.json): CLAUDE.md root content, subdirectory CLAUDE.md files - Pass 2 (
output-tooling.json): skills, hooks, subagents, mcp_servers, settings_hooks
2. Edit the appropriate pass fixture
Skill entries in output-tooling.json must have:
- No angle brackets in description fields
namein kebab-case- Valid SKILL.md content as a JSON string (use
\nfor newlines)
Example skill entry:
{
"name": "my-skill",
"description": "Does something specific to this project. Use when...",
"content": "---\nname: my-skill\ndescription: >\n Does something specific. Use when...\n Do NOT use for...\n---\n\n## Before You Start\n..."
}Hook entries must maintain the 1:1 hooks-to-settings_hooks relationship:
// In hooks[]
{"filename": "check.sh", "event": "PostToolUse", "description": "...", "content": "#!/usr/bin/env bash\n..."}
// Matching entry in settings_hooks[]
{"event": "PostToolUse", "matcher": "Write", "command": ".claude/hooks/check.sh"}3. Re-merge output.json
After editing either pass fixture:
jq -s '.[0] * .[1]' \
tests/fixtures/synthesis/output-docs.json \
tests/fixtures/synthesis/output-tooling.json \
> tests/fixtures/synthesis/output.json4. Verify no angle brackets in descriptions
grep -n '[<>]' tests/fixtures/synthesis/output-tooling.json | head -20Angle brackets in skill/subagent descriptions will cause validate-skill.sh to fail, and postprocess_descriptions() in lib/synthesize.sh will silently replace them at runtime — meaning the fixture diverges from what production produces.
5. Update dependent test assertions
Check tests/unit/merge.bats and tests/integration/synthesize_phase.bats for assertions on skill count, specific field values, or hook count that may need updating.
6. Verify the claude_md padding in output-docs.json
The claude_md field contains deliberate padding lines to exceed the 100-line minimum for validate_claude_md checks. Do NOT trim it:
echo "$(jq -r '.claude_md' tests/fixtures/synthesis/output-docs.json | wc -l) lines"
# Must be >= 100Verify
make test-unit
make test-integrationCommon Mistakes
- Editing
output.jsondirectly — it gets overwritten on the next merge. Always edit the pass fixture and re-merge. - Using
make_claude_envelopeonoutput.json— unit tests copyoutput.jsonraw into$WORK_DIR/synthesis/; integration tests wrapoutput-docs.jsonandoutput-tooling.jsonwithmake_claude_envelope. Using the wrong combination causes silentnullextractions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

