Skip to content

Add Claude Code adoption kit renderer#112

Merged
pengfei-threemoonslab merged 3 commits into
mainfrom
claude/determined-mccarthy-ff5c4c
May 22, 2026
Merged

Add Claude Code adoption kit renderer#112
pengfei-threemoonslab merged 3 commits into
mainfrom
claude/determined-mccarthy-ff5c4c

Conversation

@pengfei-threemoonslab
Copy link
Copy Markdown
Contributor

Summary

  • Adds a claude-code-skill target so agents-shipgate init --write --agent-instructions=claude-code-skill programmatically installs the full Claude Code skill bundle at .claude/skills/agents-shipgate/. Mirrors the codex-skill renderer shipped in Add Codex adoption kit and live harness driver #108.
  • Generalizes _apply_codex_skill into _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.
  • Hard-codes all 10 bundle files (SKILL.md, 8 recipe prompts, advisory CI template) as string constants for offline portability; snapshot tests pin them byte-for-byte against the checked-in 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 init call, which lets Claude Code discover and run Shipgate on their tool surfaces without bespoke setup.

Reviewer notes

  • The renderer's CI recipe is version-stamped from __version__, so the test_claude_code_skill_source_matches_renderer parity test excludes advisory-pr-comment.yml (the SHA snapshot is the authoritative guard for it). Same approach as the Codex renderer.
  • _FILE_TREE_MODULES holds module references rather than the dict values directly — required so monkeypatch.setattr on PRIOR_RENDER_SHA256 still works in the migration test.
  • test_strict_mode_token_only_in_ci_pointer_paragraph now 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 regressions
  • Manual: agents-shipgate init --workspace /tmp/test-repo --agent-instructions=claude-code-skill (dry-run) shows all 10 files
  • Manual: agents-shipgate init --workspace /tmp/test-repo --write --agent-instructions=claude-code-skill writes the bundle and a subsequent Claude Code session triggers on the SKILL.md

🤖 Generated with Claude Code

pengfei-threemoonslab and others added 3 commits May 22, 2026 13:33
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>
@pengfei-threemoonslab pengfei-threemoonslab merged commit 7cd7a29 into main May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant