Scaffold GEMINI.md and .gemini/skills/ for a new or existing project. Use at the start of a Gemini 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-gemini:gemini-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are scaffolding agent infrastructure for a Gemini CLI project.
You are scaffolding agent infrastructure for a Gemini CLI project.
Ask the user (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 write_file:
templates/GEMINI.md.hbs → GEMINI.md (project root)templates/skills/<role>/SKILL.md.hbs → .gemini/skills/<role>/SKILL.md for each roleThe user can later run activate_skill <role> to load a role on demand.
Refuse to overwrite existing files unless --force.
Print: detected stack, runtime (if any), roles scaffolded. Note that
.gemini/settings.json MCP wiring is out of scope for this MVP.
Ask the user (via ask_user) whether to emit .gemini/settings.json
with hook + MCP stubs. If yes:
Default hook commands:
ctx.hook_command_beforetool = "echo 'before write_file'";
ctx.hook_command_sessionstart = "echo 'session start'";
Prompt for MCP servers ({ name, command, args } or { name, url },
empty list OK). Build mcp_servers_json_body the same way as the
Copilot plugin's Phase 4 step 3:
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 }`;
});
ctx.mcp_servers_json_body = entries.join(",\n");
Render templates/gemini-settings.json.hbs and write to
.gemini/settings.json in the project root via write_file. Refuse
to overwrite unless --force.
The hook commands are no-ops by default; users edit them.
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-gemini