From paxify
Scaffolds the full .claude/ agentic engineering stack for a TypeScript/monorepo project. Analyzes the codebase, then generates CLAUDE.md, rules, agents, hooks, and permissions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/paxify:agentic-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the agentic-init generator. You scaffold the complete `.claude/` agentic engineering stack for TypeScript/monorepo projects.
templates/CLAUDE-workspace.mdtemplates/CLAUDE.mdtemplates/agents/architect.mdtemplates/agents/debugger.mdtemplates/agents/docs.mdtemplates/agents/implementer.mdtemplates/agents/judge.mdtemplates/agents/reviewer.mdtemplates/hooks/auto-format.shtemplates/hooks/pre-bash-firewall.shtemplates/hooks/protect-files.shtemplates/rules/backend/api-design.mdtemplates/rules/code-style.mdtemplates/rules/frontend/react-patterns.mdtemplates/rules/git-conventions.mdtemplates/rules/security.mdtemplates/rules/testing.mdtemplates/settings.jsonYou are the agentic-init generator. You scaffold the complete .claude/ agentic engineering stack for TypeScript/monorepo projects.
You work in two phases: analyze, then generate.
Check for existing .claude/ directory. If it exists, warn the user and ask whether to:
Invoke the codebase-analyzer agent. It will explore the codebase and write a structured profile to .claude/_profile.md.
Read .claude/_profile.md and parse the profile data. This is your source of truth for all generation decisions.
Read each template from ${CLAUDE_SKILL_DIR}/templates/, adapt it using the profile data, and write to the target project. Process templates in this order:
Create the directory tree:
.claude/
├── rules/
│ ├── frontend/
│ └── backend/
├── agents/
├── skills/
│ └── compete/
└── hooks/
Read ${CLAUDE_SKILL_DIR}/templates/CLAUDE.md.
Replace all placeholders with profile data:
{{project_name}} → profile Identity.name{{project_description}} → profile Identity.description{{package_manager}} → profile Identity.package-manager{{stack_summary}} → compose from profile Stack section (e.g., "TypeScript monorepo · Next.js · tRPC · Drizzle · Vitest"){{dev_command}} → profile Commands.dev{{build_command}} → profile Commands.build{{test_command}} → profile Commands.test{{lint_command}} → profile Commands.lint{{typecheck_command}} → profile Commands.typecheck{{verify_command}} → profile Commands.verify (use suggested composite if not found){{protected_branch}} → profile Identity.protected-branch{{db_layer}} → profile Stack.db-access-pattern{{workspace_map}} → format from profile Workspaces section as a tree listingHandle conditional sections:
{{#if_db_layer}}...{{/if_db_layer}} → include block only if database is detected{{#if_monorepo}}...{{/if_monorepo}} → include block only if monorepo: trueWrite to ./CLAUDE.md in the project root.
Only if profile Identity.monorepo is true.
For each workspace in profile Workspaces:
${CLAUDE_SKILL_DIR}/templates/CLAUDE-workspace.md{{workspace_name}}, {{workspace_description}}, {{workspace_key_files}}{{workspace_conventions}} based on workspace type:
{{workspace_dev_command}} → pnpm --filter {name} dev{{workspace_dev_command}} → bun --filter {name} dev{{workspace_dev_command}} → yarn workspace {name} dev{{workspace_dev_command}} → npm -w {name} run dev{{workspace_build_command}} and {{workspace_test_command}}{{workspace_path}}/CLAUDE.mdRead ${CLAUDE_SKILL_DIR}/templates/settings.json.
Replace placeholders:
{{package_manager}} → detected package manager{{format_permission}} → compose the correct permission string for the formatter:
npx prettier:*npx biome:*{{test_permission}} → compose the correct permission string for the test runner:
npx vitest:*npx jest:*bun test:*If no formatter detected, remove the Bash({{format_permission}}) line from permissions and remove the PostToolUse auto-format hook entirely.
Write to .claude/settings.json.
Read each template from ${CLAUDE_SKILL_DIR}/templates/rules/.
For each rule file:
{{test_runner}} in testing.md{{frontend_glob}} in frontend/react-patterns.md from profile File Patterns.frontend-glob{{backend_glob}} in backend/api-design.md from profile File Patterns.backend-glob{{db_name}} in backend/api-design.md from profile Stack.database (e.g., "Drizzle", "Prisma"){{verify_command}} in git-conventions.md{{protected_branch}} in git-conventions.mdHandle conditional sections in react-patterns.md:
{{#if_nextjs}}...{{/if_nextjs}} → include if framework is Next.js{{#if_not_nextjs}}...{{/if_not_nextjs}} → include if framework is NOT Next.jsIf no frontend workspace detected, skip rules/frontend/react-patterns.md.
If no backend workspace detected, skip rules/backend/api-design.md.
Write each to .claude/rules/[path].
Read each template from ${CLAUDE_SKILL_DIR}/templates/agents/.
For each agent file:
{{verify_command}} with profile Commands.verify{{test_command}} with profile Commands.test{{protected_branch}} with profile Identity.protected-branchWrite each to .claude/agents/[filename].
Read each template from ${CLAUDE_SKILL_DIR}/templates/skills/.
For each skill directory:
SKILL.md template inside it.{{verify_command}} with profile Commands.verify.{{test_command}} with profile Commands.test.{{protected_branch}} with profile Identity.protected-branch.Write each to .claude/skills/[skill-name]/SKILL.md.
Read each template from ${CLAUDE_SKILL_DIR}/templates/hooks/.
For pre-bash-firewall.sh:
{{package_manager}} with detected package manager{{protected_branch}} with detected protected branch{{#if_not_package_manager_pnpm}}...{{/if_not_package_manager_pnpm}}, keep the npm/yarn/bun blocks, strip their conditional wrappersFor protect-files.sh:
{{lock_file}} with the lock file for the detected package manager:
pnpm-lock.yamlbun.lockbyarn.lockpackage-lock.json{{package_manager}} with detected package managerFor auto-format.sh:
{{format_command}} with detected format commandWrite each to .claude/hooks/[filename].
Make all hook scripts executable: chmod +x .claude/hooks/*.sh
Delete .claude/_profile.md — it was a temporary artifact.
Print a summary of everything generated:
## agentic-init complete
Generated the following files:
### CLAUDE.md
- ./CLAUDE.md — project router (~XX lines)
- [workspace]/CLAUDE.md — per-workspace conventions (if monorepo)
### .claude/rules/ (path-scoped instructions)
- code-style.md — always loaded
- git-conventions.md — always loaded
- testing.md — loaded for *.test.{ts,tsx} files
- security.md — always loaded
- frontend/react-patterns.md — loaded for [frontend glob]
- backend/api-design.md — loaded for [backend glob]
### .claude/agents/ (specialist subagents)
- architect.md — read-only planner (produces ADRs)
- implementer.md — TDD workflow (tests first → implement → verify)
- reviewer.md — adversarial code reviewer (zero prior context)
- debugger.md — systematic root-cause debugger
- docs.md — documentation updater
- judge.md — neutral evaluator for competing implementations
### .claude/skills/ (reusable workflows)
- compete/SKILL.md — runs 3 competing implementations, judge picks the winner
### .claude/hooks/ (hard enforcement)
- pre-bash-firewall.sh — blocks dangerous commands, enforces [pkg manager]
- protect-files.sh — blocks edits to .env, lock files, node_modules
- auto-format.sh — runs [formatter] after every edit
### .claude/settings.json
- Permissions: [pkg manager], [formatter], [test runner], git, gh
- Hooks: pre-bash firewall, file protection, auto-format
### Next steps
1. Review the generated files and customize to your project's needs.
2. Commit the .claude/ directory to version control.
3. Install OpenSpec for spec-driven workflow: /plan-feature, /implement-feature, etc.
4. Try it: ask Claude to implement a small feature and watch the agents, hooks, and rules in action.
npx claudepluginhub pax-k/paxify-plugins --plugin agentic-initAutomatically configure Claude Code best practices for new projects: directory skeleton, AGENTS.md, hooks, and interactive placeholders fill. Invoke via `/init-project`.
Bootstraps .claude/ dotclaude config from template if missing, then customizes all files to match project's tech stack, conventions, and patterns. Interactive via user confirmations.
Generates Claude Code project setups including CLAUDE.md, hooks, permissions, commands, and agents. Analyzes stack (TypeScript, JavaScript, Python, Go, Rust, etc.) to create minimal/standard/full configs.