aips-init

A project setup command that detects whether a project is new, using an older setup, or needs repair, then chooses the matching AIPS initialization or upgrade process.

In plain words
What is it for?
Use it to initialize AIPS in a new project, upgrade an older version, migrate legacy files, or repair an incomplete setup.
Why use it?
It removes the need to identify the project's setup state and migration path by hand. It is designed to be safe to run again when needed.

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/kernalix7/aips/aips-init
Clone the repo
git clone --depth 1 https://github.com/kernalix7/AIPS
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,576 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 4 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.00019 $0.02576
Opus 5 $0.00010 $0.01288
Sonnet 5 $0.00004 $0.00515
Haiku 4.5 $0.00002 $0.00258

Measured 2d ago against content hash 596fc738318a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade E, and why

aips-init scanned grade E with 4 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 2d ago.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- **CUR > PLUGIN (project marker ahead of plugin)** → STOP and warn: user is running an older plugin against a newer project. Prompt them to run `curl -fsSL https://raw.githubusercontent.com/kernalix7/AIPS/main/install.s

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

AIPS_ROOT="$(find ~/.claude/plugins/cache/AIPS/AIPS -maxdepth 1 -type d -name '[0-9]*' | sort -V | tail -1)"

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

- **PRESERVE**: `WORK_STATUS.md`, `memory/`, `sessions/{current,recovery,handoff-*}.md`, `.mcp.json`, `.gitignore`, `tmp-igbkp/{archive,restore,purge-history,verify-setup,uninstall,smoke-test-hooks,secret-guard,automode-

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **CUR > PLUGIN (project marker ahead of plugin)** → STOP and warn: user is running an older plugin against a newer project. Prompt them to run `curl -fsSL https://raw.githubusercontent.com/kernalix7/AIPS/main/install.s
commands/aips-init.md · 100 lines

How it starts

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

/aips:init

Auto-detect current directory state and run the correct v7.0 initialization path. Idempotent and safe to re-run.

Paths (RESOLVE FIRST)

The lib scripts and templates live inside the installed plugin, not the current project. Before running any step, resolve AIPS_ROOT:

AIPS_ROOT="$(find ~/.claude/plugins/cache/AIPS/AIPS -maxdepth 1 -type d -name '[0-9]*' | sort -V | tail -1)"

AIPS_ROOT then contains lib/, templates/, agents/, commands/, hooks/, etc. Use it as the prefix for every lib/...sh and templates/... reference below.

PROJECT_ROOT = git rev-parse --show-toplevel (or pwd if not a git repo).

Detection

Classify PROJECT_ROOT into one of 4 cases:

Case Signal Action
A — Fresh .priv-storage/ does NOT exist Full fresh init
B — v5.x legacy .priv-storage/AI_PROJECT_SETUP.md exists Migration plan + single confirm + lib/upgrade.sh --only-cleanup --auto-confirm (legacy alias: lib/migrate-from-md.sh)
C — version-aware re-init / upgrade .priv-storage/ exists, NO AI_PROJECT_SETUP.md inside Read .priv-storage/.aips-version. If older than plugin → run lib/upgrade.sh (legacy alias: lib/upgrade-to-v7.sh) + write current marker. If equal → idempotent re-init.
D — Repair .priv-storage/ partially present, OR root CLAUDE.md exists but .priv-storage/ missing, OR broken symlinks Detect missing files, restore from templates only — never overwrite user content

CASE A — Fresh project

  1. Run bash "$AIPS_ROOT/lib/detect-project.sh" "$PROJECT_ROOT" → capture LANG, FRAMEWORK, PKG_MGR, PROJECT_NAME, GIT_REMOTE, DEPLOYMENT.
  2. Render: bash "$AIPS_ROOT/lib/render-claude-md.sh" "$PROJECT_ROOT" → writes .priv-storage/CLAUDE.md (Section 1-7 + 11 only).
  3. mkdir -p .priv-storage and cp "$AIPS_ROOT/templates/WORK_STATUS.md.tmpl" .priv-storage/WORK_STATUS.md (only if absent — never clobber user content).
  4. cp -r "$AIPS_ROOT/templates/memory/." .priv-storage/memory/ (MEMORY.md index + starter category files).
  5. Render .priv-storage/.claude/settings.json from $AIPS_ROOT/templates/settings.json.tmpl via bash "$AIPS_ROOT/lib/render-settings-json.sh" "$PROJECT_ROOT" — sets statusLine to $HOME/.local/bin/aips-statusline (created by globalize-toolkit.sh in install.sh), keeps user-tunable keys (model, outputStyle, env, teammateMode, defaultTeamMode, attribution), and removes any stale .hooks block (the plugin's hooks.json owns hooks).
  6. Create root symlinks if absent: CLAUDE.md → .priv-storage/CLAUDE.md, AGENTS.md → .priv-storage/CLAUDE.md, .cursorrules → .priv-storage/CLAUDE.md, .vscode/settings.json → .priv-storage/.vscode/settings.json (create .priv-storage/.vscode/settings.json if absent first). The .claude directory at the project root is itself a symlink to .priv-storage/.claude, so the rendered settings.json above is visible at both paths.
  7. mkdir -p tmp-igbkp && cp "$AIPS_ROOT/templates/tmp-igbkp/"*.sh tmp-igbkp/ && chmod +x tmp-igbkp/*.sh (project-local toolkit; v7.0 hybrid will later globalize via /aips:upgrade --to v7.0).
  8. Do NOT touch the per-project .gitignore. AIPS ignores live in the global ~/.config/git/ignore (installed by install.sh via lib/setup-global-gitignore.sh). The per-project file stays for project-specific patterns (build dirs, framework caches, etc.). If an old AIPS block from v6.0-or-earlier is present, lib/upgrade.sh strips it on the next upgrade — fresh inits never add one.
  9. Write marker with the current plugin version (read it from "$AIPS_ROOT/.claude-plugin/plugin.json"): jq -r .version "$AIPS_ROOT/.claude-plugin/plugin.json" > .priv-storage/.aips-version. Falls back to sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' if jq is absent.
  10. Run bash "$AIPS_ROOT/lib/verify-init.sh" "$PROJECT_ROOT" for PASS/FAIL summary.

Read the full file on GitHub · 100 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. 2d ago First seen · 100 lines · 19 tokens per session scan E 596fc738318a

Subscribe to this mod's changes

aips-init is a command published in the GitHub repository kernalix7/AIPS (5 stars, last pushed 3mo ago), licensed MIT. It adds 19 tokens to every session and 2,576 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it E with 4 findings (downloads and executes remote code, reads agent configuration directories, reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.