Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 6.96 KB

README.md

File metadata and controls

61 lines (44 loc) · 6.96 KB

AI Coding Feature

This feature adds agent-agnostic AI coding skills and the Claude Code GitHub Action for @claude mentions on issues and pull requests. Skills are canonically stored under .agents/skills/ in this repo. Copilot/agent-agnostic agents get them as file stubs symlinked into .github/skills/; both Claude Code and GitHub Copilot also get them installed live at runtime via npx skills (no .claude/skills/ or ~/.copilot/skills/ copy is committed to consumer repos). Claude Code additionally gets a couple of ready-made plugins (caveman, ponytail) enabled via its own plugin-marketplace mechanism. All three — skills, plugins, and target agents — are listed in one manifest at the consumer repo root: ai-coding.json.

Other features can opt into skills too: dependsOn this feature, ship a stubs/ai-coding.json fragment with their own skills/agents/plugins, and call .claude/hooks/configure-skills.sh sync from their own postCreateCommand. feature-configure's stub deployment merges every feature's ai-coding.json fragment (array fields are unioned) into one root file.

Quick Start — devcontainer.json

"features": {
    "ghcr.io/tomgrv/devcontainer-features/ai-coding:11": {}
}

Quick Install — console

npx tomgrv/devcontainer-features -- add ai-coding
# or, without node/npm:
curl -fsSL https://raw.githubusercontent.com/tomgrv/devcontainer-features/develop/setup.sh | sh -s -- add ai-coding

Quick Install — npm

npm install --save-dev @tomgrv/devcontainer-features-ai-coding

What gets installed

  • .github/workflows/claude.yml — runs Claude on @claude mentions in issue comments, PR comments, PR reviews, PR review comments, and new issues.
  • .github/workflows/deepseek-review.yml — runs DeepSeek Code Review on every PR open/reopen/sync, and on demand via an @deepseek mention in a PR comment, posting an automated review.
  • .agents/skills/caveman* — ultra-compressed communication mode skills (terse mode, commit messages, PR reviews, markdown compression, help reference). Symlinked from .github/skills/; installed live for Claude Code and GitHub Copilot.
  • .agents/skills/pm/* — product-management workflow skills: research synthesis, roadmap prioritization brief, PRD drafting, metrics digest, release notes generation. Symlinked from .github/skills/; installed live for Claude Code and GitHub Copilot.
  • .agents/skills/feature-ai-coding/ — self-doc skill for this feature.
  • ai-coding.json (repo root) — the dedicated manifest listing everything installed: skills (names under .agents/skills/), agents (npx skills target ids — claude-code, github-copilot), and plugins (Claude Code plugin-marketplace entries — name, marketplace, git URL). Add or drop a skill/agent/plugin here, not in the scripts. Other features that dependsOn ai-coding can ship their own stubs/ai-coding.json fragment — feature-configure's generic JSON-stub merge unions it into this same root file.
  • .claude/hooks/configure-skills.sh — the npx skills wrapper. configure-skills.sh sync reads root ai-coding.json and, for each skill, runs npx skills add tomgrv/devcontainer-features/.agents/skills/<name> -a <agent> ... -y for every listed agent, then merges each declared plugin into .claude/settings.json's enabledPlugins/extraKnownMarketplaces (the settings file Claude Code reads to enable plugins). Runs on devcontainer postCreate (configure-skills.sh) and on every Claude Code SessionStart — so it also covers claude.ai/code web/cloud sessions, which never run devcontainer postCreate.
  • .claude/settings.json — seeds ai-coding.json's plugins (caveman, ponytail) via enabledPlugins/extraKnownMarketplaces; kept in sync by configure-skills.sh sync as plugins are added/removed.
  • .mcp.json / .vscode/mcp.json — Context7 MCP server (up-to-date library docs; add use context7 to a prompt) and the Memory knowledge-graph server (cross-session project notes). Merged with other features' MCP entries (e.g. larasets adds laravel-boost). Needs Node.js.
  • Harness engineering (after Learn Harness Engineering) — opt-in long-running-agent harness; inert until a repo has .agents/progress.md or .agents/features.json at its root:
    • .agents/skills/harness/ — init (.agents/features.json, .agents/progress.md, from templates/) and the fixed session start / end loop. Run /harness to initialize.
    • .agents/instructions/harness.instructions.md — short always-on rules: durable state in files, one feature at a time, evidence-gated passing, handoff before stopping.
    • .claude/hooks/harness-startup.sh (SessionStart) — is the harness startup: prints the progress log head, next unfinished feature, repo rule files and recent commits, and shows the branch's CI status from the dev forge (GitHub gh, GitLab glab, Azure DevOps az; nothing repo-controlled is executed, dependencies come from the devcontainer features' own install).
    • .claude/hooks/harness-stop.sh (Stop) — blocks once when there is uncommitted work but .agents/progress.md was not updated; never loops.
    • .claude/agents/harness-evaluator.md — skeptical verifier subagent (fresh context) to run before marking a feature passing.
  • CLAUDE.md — orientation file for Claude Code.
  • .agents/README.md — documents the .agents/ layout.

Skills follow the name/description frontmatter convention in SKILL.md. .agents/ is the single source of truth; Copilot reads a stub copy, Claude Code and GitHub Copilot also fetch the same content live via npx skills.

Setup

After installing, add a repository secret named ANTHROPIC_API_KEY (Settings → Secrets and variables → Actions → New repository secret) containing a valid Anthropic API key, so the claude.yml workflow can authenticate. Without this secret, @claude mentions will not trigger a response.

Likewise, add a repository secret named DEEPSEEK_CHAT_TOKEN containing a valid DeepSeek API key, so the deepseek-review.yml workflow can authenticate. Without this secret, DeepSeek review comments will not be posted.

Skills already work with DeepSeek and any other file-reading coding assistant with no extra setup: .agents/skills/ is deployed as plain files (the universal agent target in ai-coding.json), so any assistant that reads repo files — including DeepSeek-based ones — picks them up without needing a dedicated npx skills agent id.

.claude/hooks/configure-skills.sh requires jq on PATH (and npx/Node.js for the skills-install step); if either is missing, or root ai-coding.json isn't found, it logs a warning and exits cleanly rather than failing the session.