project-init

A project setup command that adds shared instructions, security checks, and Git hooks to a repository. Git hooks are scripts that run automatically during Git actions.

In plain words
What is it for?
Use it to initialize the repository, add project instruction templates, configure secret scanning, and enable the harness Git-hook framework.
Why use it?
It avoids manually creating the files and wiring needed to apply the agent harness to one project, while leaving environment files and secrets untouched.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/joymin5655/agent/project-init
Clone the repo
git clone --depth 1 https://github.com/joymin5655/Agent
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 682 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00028 $0.00682
Opus 5 $0.00014 $0.00341
Sonnet 5 $0.00006 $0.00136
Haiku 4.5 $0.00003 $0.00068

Measured yesterday against content hash 6971d4ea125f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/project-init.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project init

Initialize the current repository with the agent-harness project scaffold.

The plugin already provides agents, skills, and runtime hooks. This command adds the project-level files and Git-hook wiring that setup.sh --project currently implements.

Steps

  1. Confirm scope with the user: project scaffold only (default), or also (re)install the global Claude Code setup. Most users want project-only here.

  2. Run the project scaffold from the repo root. A byte-identical file is unchanged; a differing destination prompts before replacement. The script never touches .env* or secrets/:

    bash "${CLAUDE_PLUGIN_ROOT}/setup.sh" --project
    

    Templates applied from ${CLAUDE_PLUGIN_ROOT}/templates/: CLAUDE.md.template, AGENTS.md.template, GEMINI.md.template, hook-config.yml.template, and gitleaks.toml.template.

    The setup also creates .git-hooks-framework, points it at the plugin cache's core/git-hooks, and sets the repository's local core.hooksPath.

  3. Customize the generated files for this project — read the new CLAUDE.md and hook-config.yml, then ask the user which project risk areas (production DB, deploy, payments, etc.) and which agents/keywords to enable.

  4. Verify no secret files were scaffolded and that the Git-hook wiring is live (each line must fail loudly — the chain short-circuits and only a fully clean state prints clean):

    test ! -f .claude/settings.local.json \
      && test ! -d .claude/logs && test ! -d .claude/locks \
      && git config --local --get core.hooksPath \
      && test -e .git-hooks-framework \
      && echo "clean"
    

    test -e (not -L) is deliberate: it follows the symlink, so a .git-hooks-framework left dangling by a plugin update fails the check instead of listing a broken link. A dangling link silently disables the pre-commit/pre-push secret gates — if this fails, re-point the link at the current plugin cache (see the lifecycle doc § 7).

Read the full file on GitHub · 67 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 67 lines · 28 tokens per session scan A 6971d4ea125f

Subscribe to this mod's changes

project-init is a command published in the GitHub repository joymin5655/Agent (2 stars, last pushed 7d ago), licensed MIT. It adds 28 tokens to every session and 682 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.