一键导入
arkive-import
Convert an existing project into arkive by analyzing git history or filesystem dates. Builds a phased, history-rich arkive/architecture.json.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert an existing project into arkive by analyzing git history or filesystem dates. Builds a phased, history-rich arkive/architecture.json.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Open the arkive web viewer to browse the project's architecture interactively.
Process queued architecture prompts from the web viewer. Drains the prompt queue by claiming, executing, and acknowledging each prompt.
Maintain the living architecture document as you build. This is the core skill — always active when arkive/architecture.json exists.
Initialize arkive architecture tracking in the current project. Handles MCP registration and skill installation.
Answer "why" questions about architectural choices using arkive/architecture.json.
Socratic quizzing after architecture updates. Optional — activates when user opts in.
| name | arkive-import |
| description | Convert an existing project into arkive by analyzing git history or filesystem dates. Builds a phased, history-rich arkive/architecture.json. |
| trigger | User says "import project", "convert project to arkive", "analyze project history", or invokes /arkive-import. |
Run this to populate arkive/architecture.json from an existing codebase. This skill reconstructs the project's architectural history by analyzing when files were introduced and what they represent.
arkive/architecture.json must exist. If it doesn't, run /arkive-init first.
# Check for git
test -d .git && echo "git" || echo "filesystem"
.git/ exists → git mode (primary, reliable)Traverse the project and collect all source files. Exclude:
node_modules/, dist/, build/, .git/, .next/, __pycache__/, vendor/package-lock.json, yarn.lock, pnpm-lock.yaml, Gemfile.lock, poetry.lock.env, .env.* (secrets)Include:
**/*.{ts,tsx,js,jsx,mjs,cjs,py,go,rs,java,kt,rb,php,css,scss,html,vue,svelte}*.json (not lockfiles), *.yaml, *.yml, *.toml, *.iniDockerfile, docker-compose.yml, .github/workflows/*.ymlMakefile, CMakeLists.txtGit mode:
# For each file, get the commit that first added it
git log --diff-filter=A --follow --format='%H %aI %s' -- <file>
Use the LAST line of output (earliest commit). Use author date (%aI), not committer date.
Filesystem mode:
Use fs.stat(file).birthtime. Fall back to mtime if birthtime is unavailable or equals epoch.
Git mode:
Filesystem mode:
Before processing, show the user what was found:
Found N phases spanning M months:
Phase 1 (2025-01-10): "Initial commit" — 12 files
src/index.ts, src/app.ts, package.json, tsconfig.json, ...
Phase 2 (2025-01-12): "Add database models" — 5 files
src/models/user.ts, src/models/post.ts, ...
Phase 3 (2025-01-15): "Authentication system" — 8 files
src/auth/login.ts, src/auth/middleware.ts, ...
...
This will process each phase sequentially. Estimated iterations: N.
Large projects may consume significant tokens.
Proceed? [Y/n]
Wait for user confirmation before proceeding.
For EACH phase:
update_architecture (MCP) or edit directly with discovered services, connections, stack entries.record_decision for choices evident in the code.express in package.json → Decision: "Express.js for HTTP server", rationale from package.json context, alternatives: ["Fastify", "Koa"]"Pre-existing choice — rationale not documented"[{ name: "Not evaluated", whyNot: "No evidence of alternatives considered" }]Phase 3/18 complete: "Authentication system"
— Added 2 services: auth-service, session-store
— Added 1 connection: auth-service -> session-store (TCP/Redis)
— Recorded 1 decision: JWT for session tokens
After all phases:
check_drift to verify consistency.Import complete.
— 18 phases processed
— 12 services, 8 connections, 5 decisions recorded
— History spans 2025-01-10 to 2025-06-30
— Drift check: 0 issues
If the session is interrupted mid-import:
history array in arkive/architecture.json."import_phase".history entry with the ORIGINAL timestamp from git/filesystem — NOT the current time.package.json or equivalent → record as a stack/framework decision."Pre-existing choice — rationale not documented"[{ name: "Not evaluated", whyNot: "No evidence of alternatives considered" }]"import_phase" and include the phase number in the summary.check_drift and report any inconsistencies.