Scaffold .github/copilot-instructions.md, AGENTS.md, and .github/instructions/ for a new or existing project. Use at the start of a Copilot CLI engagement to give the agent durable project memory.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-builder-copilot:copilot-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are scaffolding agent infrastructure for a GitHub Copilot CLI project.
lib/detect-stack.mjslib/render.mjstemplates/AGENTS.md.hbstemplates/copilot-instructions.md.hbstemplates/hooks/agentStop.jsontemplates/hooks/postToolUse.jsontemplates/hooks/preToolUse.jsontemplates/instructions/dev.instructions.md.hbstemplates/instructions/planner.instructions.md.hbstemplates/instructions/reviewer.instructions.md.hbstemplates/mcp-config.json.hbsYou are scaffolding agent infrastructure for a GitHub Copilot CLI project.
Ask via ask_user (one at a time):
Run project detection:
import { detectProject } from "./lib/detect-stack.mjs";
const detected = detectProject(process.cwd());
import { render } from "./lib/render.mjs";
const ctx = {
purpose, size, qa_personas, deploy_targets, constraints,
...detected,
services_str: detected.services.join(", "),
agents: [
{ name: "planner", when: "all planning" },
{ name: "dev", when: "implementation" },
{ name: "reviewer", when: "final review" },
],
};
Render and write via apply_patch:
templates/copilot-instructions.md.hbs → .github/copilot-instructions.mdtemplates/AGENTS.md.hbs → AGENTS.md (project root)templates/instructions/<role>.instructions.md.hbs → .github/instructions/<role>.instructions.md for each roleCopilot CLI deduplicates content between copilot-instructions.md and AGENTS.md, so co-existence is safe.
Refuse to overwrite existing files unless --force.
Print: detected stack, runtime (if any), the files written. Note that
.github/hooks/ and ~/.copilot/mcp-config.json wiring is out of scope
for this MVP.
Ask the user whether to emit .github/hooks/ stubs and an MCP config
snippet. If yes:
Copy these static stubs into the project (verbatim — no rendering):
templates/hooks/preToolUse.json → .github/hooks/preToolUse.jsontemplates/hooks/postToolUse.json → .github/hooks/postToolUse.jsontemplates/hooks/agentStop.json → .github/hooks/agentStop.jsonRefuse to overwrite unless --force.
Prompt for MCP servers ({ name, command, args } or { name, url },
empty list OK).
Build the JSON body:
const entries = mcp_servers.map((s) => {
const fields = s.command
? ` "command": ${JSON.stringify(s.command)},\n "args": ${JSON.stringify(s.args ?? [])}`
: ` "url": ${JSON.stringify(s.url)}`;
return ` ${JSON.stringify(s.name)}: {\n${fields}\n }`;
});
const mcp_servers_json_body = entries.join(",\n");
Render templates/mcp-config.json.hbs and PRINT it to stdout (do NOT
write to ~/.copilot/mcp-config.json automatically). Prefix output with:
# Copy the following into ~/.copilot/mcp-config.json:
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub kim-song-jun/agent-skill --plugin harness-builder-copilot