shared-setup-patterns

A shared collection of setup templates and checks used by several project-initialisation commands. It includes security checks, Claude Code folder templates, and patterns for recognising project languages and frameworks.

In plain words
What is it for?
Use it when creating or configuring Python, JavaScript, existing, exploratory, or user-level projects, especially for adding safety hooks and standard project files.
Why use it?
It keeps common setup behaviour consistent and avoids repeating the same configuration in every setup command.

Skill for Claude CodeCodex

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 skills/stefan-jansen/claude-code-toolkit/shared-setup-patterns
Any agent
npx skills add stefan-jansen/claude-code-toolkit --skill shared-setup-patterns
Clone the repo
git clone --depth 1 https://github.com/stefan-jansen/claude-code-toolkit

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 587 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00033 $0.00587
Opus 5 $0.00016 $0.00293
Sonnet 5 $0.00007 $0.00117
Haiku 4.5 $0.00003 $0.00059

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

Security

Grade B, and why

shared-setup-patterns scanned grade B with 2 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **PreToolUse**: Blocks dangerous commands (rm -rf, sudo, chmod 777)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **PreToolUse**: Blocks dangerous commands (rm -rf, sudo, chmod 777)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

plugins/setup/skills/shared-setup-patterns/SKILL.md · 85 lines

How it starts

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

Shared Setup Patterns

Purpose: Common configuration patterns and templates shared across all project setup commands.

Used by: /setup:python, /setup:javascript, /setup:existing, /setup:explore, /setup:user

Token Impact: Provides ~1,700 tokens of shared templates loaded once, avoiding duplication across 5+ commands (saves ~3,200 tokens through reuse).


Contents

This skill contains ONLY patterns shared by multiple setup commands:

  1. Security Hooks - PreToolUse and PostToolUse hooks for all project types
  2. Claude Framework Structure - .claude/ directory templates and memory files
  3. Framework Detection - Patterns for auto-detecting project languages and frameworks

Language-specific templates (Python, JavaScript, etc.) are kept inline in their respective commands.


1. Security Hooks

Located: templates/security_hooks.json

Comprehensive security and quality hooks configuration:

  • PreToolUse: Blocks dangerous commands (rm -rf, sudo, chmod 777)
  • PostToolUse: Auto-formats code (ruff, prettier, eslint), validates JSON/markdown

Used by: ALL setup commands that create projects


2. Claude Framework Structure

Located: templates/claude_framework/

Templates for .claude/ directory structure:

  • structure.md - Directory layout and purpose
  • memory_templates/ - project_state.md, dependencies.md, conventions.md, decisions.md
  • work_structure.md - Work directory organization

Used by: ALL setup commands


3. Framework Detection Patterns

Located: templates/framework_detection.md

Patterns for auto-detecting:

  • Languages: Python, JavaScript/TypeScript, Go, Rust
  • Frameworks: FastAPI, Django, Flask, Next.js, React, Express
  • Tools: pytest, Jest, Mocha, go test, cargo test

Used by: /setup:existing, /setup (if dispatcher exists)


Usage Pattern

Commands reference this skill in frontmatter:

skills: [shared-setup-patterns]

Then access specific templates:

  • Security hooks: Load from templates/security_hooks.json
  • Framework structure: Generate from templates/claude_framework/ templates
  • Detection: Use patterns from templates/framework_detection.md

Read the full file on GitHub · 85 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 · 85 lines · 33 tokens per session scan B 37f510f42d08

Subscribe to this mod's changes

shared-setup-patterns is a skill published in the GitHub repository stefan-jansen/claude-code-toolkit (85 stars, last pushed 1mo ago), licensed MIT. It adds 33 tokens to every session and 587 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.