Activation Contract
Use when asked to set up, add, configure, or integrate Graphify in a project. Do not use unless explicitly requested.
Hard Rules
- Never invoke
graphify directly as a CLI command. On Windows the executable may not be on PATH. Always use python -m graphify.
- Never run
graphify <platform> install commands (e.g. graphify codex install, graphify claude install). These create hidden hook directories (.codex/, .claude/settings.json, etc.) that the user has not requested. Instruction injection is handled by setup.py with hand-rolled, marker-delimited sections.
- Incremental update syntax is
python -m graphify . --update, not graphify update ..
Execution Steps
- Copy
assets/setup.py from this skill to the project root.
- Run from the project root:
python setup.py
# or with a custom root:
python setup.py --project-root /path/to/project
# skip the slow initial build on large repos:
python setup.py --skip-build
The script executes all steps in order:
pip install graphifyy
- Inject a strict, mandatory
<!-- graphify:start --> … <!-- graphify:end --> section that requires agents to use Graphify before inspecting or searching source files:
AGENTS.md — always (created if missing)
CLAUDE.md, .github/copilot-instructions.md, GEMINI.md, .cursor/rules/graphify.mdc, .windsurfrules, .clinerules, WARP.md — injected only if the file already exists
- Re-runs are idempotent: markers are replaced, not duplicated
- Creates
.graphifyignore (code-only exclusions, no API key needed)
- Adds
graphify-out/ to .gitignore, .gcloudignore, and deployables/*/gcloudignore-gae
- Installs git hooks:
- Tries
python -m graphify hook install (post-commit + post-checkout, cross-platform)
- Falls back to hand-rolled
post-commit if the subcommand is unavailable or a non-graphify hook already exists (existing hook body is preserved)
- Adds a
## Graphify section to README.md
- Runs
python -m graphify . for the initial build (skip with --skip-build)
After git pull — each teammate runs once:
pip install graphifyy
python -m graphify .
Output Contract
AGENTS.md at project root with the strict, mandatory Graphify section
- Any pre-existing agent files (
CLAUDE.md, .github/copilot-instructions.md, etc.) updated with the same section — idempotently
- No
.codex/, .claude/settings.json, .gemini/, or any other hidden hook directories are created
.graphifyignore at project root
graphify-out/ entry in all discovered ignore files
## Graphify section added to README.md
.git/hooks/post-commit (and post-checkout when native install succeeds) installed and executable, using python -m graphify . --update
References
assets/setup.py — full automated setup script
1---2name: setup-graphify3description: Trigger: set up graphify, add graphify, configure graphify, integrate graphify. Installs graphifyy, injects a marker-delimited Graphify section into every agent-instruction file present in the project (AGENTS.md always; CLAUDE.md, .github/copilot-instructions.md, GEMINI.md, Cursor rules, and others only if they already exist), adds graphify-out/ to all ignore files, installs post-commit + post-checkout git hooks, and runs the initial knowledge graph build. No hidden hook directories are created. Requires Python 3.12+.4license: Apache-2.05---67## Activation Contract89Use when asked to set up, add, configure, or integrate Graphify in a project. Do not use unless explicitly requested.1011## Hard Rules1213- **Never invoke `graphify` directly as a CLI command.** On Windows the executable may not be on PATH. Always use `python -m graphify`.14- **Never run `graphify <platform> install` commands** (e.g. `graphify codex install`, `graphify claude install`). These create hidden hook directories (`.codex/`, `.claude/settings.json`, etc.) that the user has not requested. Instruction injection is handled by `setup.py` with hand-rolled, marker-delimited sections.15- **Incremental update syntax is `python -m graphify . --update`**, not `graphify update .`.1617## Execution Steps18191. Copy `assets/setup.py` from this skill to the project root.202. Run from the project root:2122```bash23python setup.py24# or with a custom root:25python setup.py --project-root /path/to/project26# skip the slow initial build on large repos:27python setup.py --skip-build28```2930The script executes all steps in order:31321. `pip install graphifyy`332. Inject a strict, mandatory `<!-- graphify:start --> … <!-- graphify:end -->` section that requires agents to use Graphify before inspecting or searching source files:34 - `AGENTS.md` — always (created if missing)35 - `CLAUDE.md`, `.github/copilot-instructions.md`, `GEMINI.md`, `.cursor/rules/graphify.mdc`, `.windsurfrules`, `.clinerules`, `WARP.md` — injected **only if the file already exists**36 - Re-runs are idempotent: markers are replaced, not duplicated373. Creates `.graphifyignore` (code-only exclusions, no API key needed)384. Adds `graphify-out/` to `.gitignore`, `.gcloudignore`, and `deployables/*/gcloudignore-gae`395. Installs git hooks:40 - Tries `python -m graphify hook install` (post-commit + post-checkout, cross-platform)41 - Falls back to hand-rolled `post-commit` if the subcommand is unavailable or a non-graphify hook already exists (existing hook body is preserved)426. Adds a `## Graphify` section to `README.md`437. Runs `python -m graphify .` for the initial build (skip with `--skip-build`)4445### After `git pull` — each teammate runs once:4647```bash48pip install graphifyy49python -m graphify .50```5152## Output Contract5354- `AGENTS.md` at project root with the strict, mandatory Graphify section55- Any pre-existing agent files (`CLAUDE.md`, `.github/copilot-instructions.md`, etc.) updated with the same section — idempotently56- **No `.codex/`, `.claude/settings.json`, `.gemini/`, or any other hidden hook directories are created**57- `.graphifyignore` at project root58- `graphify-out/` entry in all discovered ignore files59- `## Graphify` section added to `README.md`60- `.git/hooks/post-commit` (and `post-checkout` when native install succeeds) installed and executable, using `python -m graphify . --update`6162## References6364- `assets/setup.py` — full automated setup script