Add Claude Code adoption kit renderer#112
Merged
Merged
Conversation
Adds a `claude-code-skill` target that programmatically generates the full Claude Code skill bundle at `.claude/skills/agents-shipgate/` so downstream repos can install it via `agents-shipgate init --write --agent-instructions=claude-code-skill`. Mirrors the existing `codex-skill` renderer pattern: hard-coded string constants for SKILL.md, all 8 recipe prompts, and the advisory CI template, with per-file SHA-256 migration tracking. Generalizes `_apply_codex_skill` into `_apply_file_tree` so both file-tree targets share the apply logic. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The `--agent-instructions=all` write surface now includes `.claude/skills/agents-shipgate/`, but three user-facing surfaces lagged: - `init --help` listed only `.agents/skills/...` (Codex bundle) when describing what `--write` mutates. - `AGENTS.md` enumerated the subset names as `agents-md,claude-md,cursor,pr-template` — missing both `codex-skill` (shipped in #108) and `claude-code-skill` (#112). - `docs/target-repo-agent-snippets.md` had a Codex Skill section but no parallel Claude Code section, leaving downstream agents reading the doc with no copy-pasteable invocation. Adds a Claude Code Skill snippet block parallel to the existing Codex block, with the recommended pairing (`--agent-instructions=agents-md,claude-md,claude-code-skill`) and a description of the bundle contents. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
`test_llms_full_is_up_to_date` failed in CI because the prior commit updated AGENTS.md (the agent-instructions paragraph) without regenerating llms-full.txt. Ran `python scripts/build-llms-full.py`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude-code-skilltarget soagents-shipgate init --write --agent-instructions=claude-code-skillprogrammatically installs the full Claude Code skill bundle at.claude/skills/agents-shipgate/. Mirrors thecodex-skillrenderer shipped in Add Codex adoption kit and live harness driver #108._apply_codex_skillinto_apply_file_tree, with lookup dicts for renderers and prior-SHA modules — adding a third file-tree target later is now a registration-only change.skills/agents-shipgate/.Why
Agent-mediated GTM: the renderer turns the Claude Code skill into a first-class adoption surface alongside Codex (#108). Downstream repos get the full prompt bundle + advisory CI template in one
initcall, which lets Claude Code discover and run Shipgate on their tool surfaces without bespoke setup.Reviewer notes
__version__, so thetest_claude_code_skill_source_matches_rendererparity test excludesadvisory-pr-comment.yml(the SHA snapshot is the authoritative guard for it). Same approach as the Codex renderer._FILE_TREE_MODULESholds module references rather than the dict values directly — required somonkeypatch.setattronPRIOR_RENDER_SHA256still works in the migration test.test_strict_mode_token_only_in_ci_pointer_paragraphnow excludes both file-tree skill bundles. Their bundled recipe prompts (e.g.stabilize-strict-mode.md) legitimately discuss strict-mode workflows — the Rule 3 guard is meant for single-surface instruction files (AGENTS.md, CLAUDE.md, Cursor rule, PR template), not multi-file recipe bundles.Test plan
pytest tests/test_agent_instructions_renderers.py tests/test_agent_instructions_apply.py -v— 52 passed, 3 skipped (case-sensitive FS tests on macOS)pytest(full suite) — 1745 passed, 4 skipped, no regressionsagents-shipgate init --workspace /tmp/test-repo --agent-instructions=claude-code-skill(dry-run) shows all 10 filesagents-shipgate init --workspace /tmp/test-repo --write --agent-instructions=claude-code-skillwrites the bundle and a subsequent Claude Code session triggers on the SKILL.md🤖 Generated with Claude Code