Skip to content

nicolas-codemate/claudeCodeConfig

Repository files navigation

   _____ _                 _         ___          _
  / ____| |               | |       / __|___   __| | ___
 | |    | | __ _ _   _  __| | ___  | |  / _ \ / _` |/ _ \
 | |____| |/ _` | | | |/ _` |/ _ \ | |_| (_) | (_| |  __/
  \_____|_|\__,_|\__,_|\__,_|\___/  \___\___/ \__,_|\___|

My Configuration

Personal configuration for Claude Code CLI


Structure

Directory Description
agents/ Custom agent definitions
commands/ Slash commands
hooks/ Pre/post tool use hooks
scripts/ Automation scripts
skills/ Skill definitions
statusline/ Status bar configuration

Key files: CLAUDE.md (global instructions), settings.json (permissions, hooks, statusline).


Status Line

Custom status bar displayed at the bottom of the Claude Code terminal, configured via statusline/statusline.sh.

Status line screenshot

The status line is split into three rows:

Row Content Details
Line 1 Session info Model name, working directory, git branch, context window usage (color-coded), lines added/removed, session cost in USD
Line 2 Current rate limit 5-hour window usage as a progress bar (●/○), percentage, and reset time
Line 3 Weekly rate limit 7-day window usage bar, percentage, pace indicator (e.g. x0.2↓ = consuming at 0.2x the linear budget), and reset date

Color coding: green (< 50%), yellow (50-80%), red (> 80%) — applies to context window, rate limit bars, and pace indicator.

Pace indicator (x0.2↓): compares actual consumption rate to a linear budget over the 7-day window. = under budget, = on track, = over budget. Helps decide whether to batch work or spread it out.


Agents

Domain-specific subagents invoked directly by Claude or orchestrated by skills. Each row links to the full definition.

Agent Model Role
code-reviewer opus Senior engineer review (quality, maintainability, readability). Triple perspective.
code-simplifier Generic code polish (JS/TS/Python/Go). Clarity, consistency, zero behavior change.
symfony-simplifier Symfony/PHP-flavored simplifier. Preferred on Symfony projects.
mentor-agent Coaching-only senior dev. Guides the user but never writes code.
michel opus Devil's advocate. Ruthless challenge / pushback / stress-test on ideas.
product-analyst sonnet Feature-level product analyst. Turns raw needs into structured specs + cross-cutting ACs.
product-strategist opus Project-level CPO. Vision, hypotheses, MVP scope, roadmap.
tech-architect opus Project-level CTO. Architecture, non-negotiable constraints, tech sequencing.
visual-verify Compares Figma mockups with browser renders to flag visual drift.
qa-writer opus Senior QA engineer who maintains the markdown test plan in sync with the codebase via diff.

Shared reference: agents/references/cross-cutting-concerns.md — 14 cross-cutting concerns (i18n, multi-tenancy, RBAC, RGPD, timezones, money, audit, idempotency, pagination, a11y, offline, observability, vendor lock-in, scalability) with detection rules, used by product-analyst and tech-architect during their scout phase.


Commands

Slash commands invokable from a Claude session. Each section links to the command source.

Create an implementation plan from an already-fetched ticket.

Argument Description
<ticket-id> Ticket identifier (required).
--skip-explore Skip exploration phase.
--skip-architect Skip Architect skill involvement.
--simple Force a lightweight plan (no AEP).

Standalone AEP planning for any feature or problem, no ticket required.

Argument Description
<feature or problem to implement> Free-text description of the work to plan.

Fetch failing CI jobs for the current (or given) branch and fix them locally.

Argument Description
[branch-name] Branch to analyze. Defaults to the current branch.

Read unresolved PR review comments and apply the requested changes in one commit.

Argument Description
[pr-number] PR to process. Defaults to the PR of the current branch.

Restore and deprecate GraphQL elements from a breaking-change report.

Argument Description
<rapport BC> BC report lines ([log] ✖ Field/Argument ... was removed ...).

Cache Figma designs (PNG + CSS) locally for a ticket.

Argument Description
[ticket-id] Ticket whose Figma URLs should be synced.
--refresh Force re-download even if a cache already exists.

Reload full feature context (ticket + plan + figma) in a fresh session for feedback or adjustments.

Argument Description
[ticket-id] Feature to reload. Auto-detected if omitted.

Generate a concise conventional-commit message and create the commit. No arguments.

Sync the Claude Code cookbook then audit the whole ~/.claude/ configuration for improvement opportunities. No arguments.

Fetch the latest Claude Code docs and Cookbook articles into ~/.claude/docs/claude-cookbook-best-practices.md. No arguments.


Skills

Skills can be invoked directly by the user (e.g. /skill-name) or loaded by commands. Some skills are auto-invoked by Claude based on their description; others set disable-model-invocation: true and are only callable explicitly. Each row links to its SKILL.md.

Skill Arguments Role
aep <problem description> Analyse-Explore-Plan methodology with parallel exploration agents.
architect Architecture patterns and checklists for high-quality plans.
ticket-workflow State machine + resume capability for ticket resolution.
resolve Modular /resolve orchestrator. Loads steps on demand.
fetch-ticket Multi-source ticket retrieval (YouTrack / GitHub / file).
analyze-ticket Complexity scoring → SIMPLE / MEDIUM / COMPLEX.
init-project Interactive wizard for .claude/ticket-config.json.
deep-review Delegates review to an isolated code-reviewer agent.
polish-code [--agent <generic|symfony|laravel>] [--scope <modified|all>] [--file <path>] Apply the correct simplifier agent to clean up current changes.
create-pr [--draft|--no-draft] [--target <branch>] [--title <title>] Push branch + create PR with correct target detection.
pr-info Fetch PR details (reviews, inline comments, diff).
review-pr <pr-number> Full product + technical PR review with optional inline posting.
mentor Coaching orchestrator behind /mentor.
express-need <description libre> Raw need → structured spec → atomic tickets.
create-ticket [--source youtrack|github] [--type bug|feature|task] [title] Create a single ticket, with optional product analysis.
bootstrap-project [review | tickets] | [idée initiale] CPO+CTO interview to bootstrap a project. State-tracked, resumable.
mcp-tool-creator Generate a project-scoped MCP server exposing docker compose tools.
rgpd-request Drafts GDPR-compliant data requests (access, deletion, portability).
skill-creator Guide for authoring new skills.
qa-sync [--from <commit>] [--flow <name>] [--dry-run] Diff-based sync of docs/qa/*.md with the codebase via qa-writer.
qa-run [--flow <name>] [--scenario <id>] [--no-tickets] [--skip-preflight] Execute the test plan via Playwright MCP, open tickets on failure.

Workflow Orchestrations

Three main workflows are built on top of the skills/agents above.

Ticket resolution (/resolve)

End-to-end automation from a ticket id to a merged PR. Each phase runs in a fresh subagent to keep context clean.

/resolve PROJ-123
    │
    ├─► fetch-ticket        → ticket.md
    ├─► analyze-ticket      → complexity SIMPLE / MEDIUM / COMPLEX
    │     └─► if COMPLEX    → parallel AEP exploration (3 agents)
    ├─► architect + plan    → plan.md
    ├─► plan validation     (interactive loop or --auto)
    ├─► implement           (1 subagent per phase, fresh context)
    ├─► polish-code         (auto-detected simplifier agent)
    ├─► deep-review         (isolated code-reviewer, triple perspective)
    ├─► workflow summary    (checklist of steps)
    └─► create-pr           (draft by default, --auto only)

Interactive mode asks at each key step; --auto fires the whole pipeline; --plan-only + --refine-plan + --continue covers epics that need human review before implementation. Per-ticket artifacts land in {PROJECT}/.claude-work/{ticket-id}/ (status.json, ticket.md, analysis.md, plan.md, review.md).

Product & project bootstrap (/express-need, /create-ticket, /bootstrap-project)

Product-minded pipelines that share a scout / interview / synthesis pattern. A scout agent reads the input, detects cross-cutting concerns, produces targeted questions, the skill asks the user via AskUserQuestion, then an agent synthesizes the final artifact.

raw idea
    │
    ├─► scout (product-analyst | product-strategist | tech-architect)
    │     └─► detect cross-cutting concerns (i18n, RBAC, RGPD, ...)
    ├─► interview (AskUserQuestion)
    └─► synthesis
          ├─► /express-need     → spec + atomic tickets → /create-ticket
          ├─► /create-ticket    → single ticket in YouTrack/GitHub
          └─► /bootstrap-project → vision, architecture, constraints, roadmap, mvp-features
                                    └─► ticket breakdown → atomic tickets via /create-ticket

/bootstrap-project tracks progress in a JSON state file (.bootstrap-state.json). Four modes: bootstrap (fresh start), continue (auto-resume where you left off), tickets (jump to ticket creation), review (re-validate hypotheses). Re-running without arguments auto-detects the last completed step and resumes.

Architectural Constraints produced by the scouts are non-negotiable and propagate into every ticket generated downstream.

Mentoring (/mentor)

Same shape as /resolve (fetch → analyze → plan → phases) but the agent never writes code — it asks questions, validates the dev's approach, and gives hints. Three modes: Progresser (Socratic), Pilote (direct guidance), Autonome (answers only when asked).

Quality Assurance (/qa-sync, /qa-run)

A two-skill cycle that turns the running app into a regression net. The plan lives in docs/qa/<flow>.md (one file per user flow), each scenario is a fenced YAML block with id, start, steps, expect. The qa-writer agent maintains it via diff; the runner executes via Playwright MCP and files tickets on failure.

recent code changes
    │
    ├─► /qa-sync
    │     ├─► git diff since last commit on docs/qa/
    │     ├─► qa-writer agent → ADD / UPDATE / REMOVE operations
    │     └─► apply ops + regenerate docs/qa/README.md index
    │
    └─► /qa-run [--flow <name>]
          ├─► preflight: Playwright MCP, .env.qa, ticket-config.json
          ├─► preflight: curl base_url; if down, propose `docker compose up -d`
          ├─► parse YAML scenarios across docs/qa/*.md
          ├─► execute (auth once per profile, fresh context per scenario)
          ├─► capture console + network for the whole run
          └─► on fail → gh issue create / mcp__youtrack__create_issue
                       (search open tickets first to dedupe by [QA] <id>)

On failure, the runner deduplicates: it searches the tracker for an open issue whose title starts with [QA] <id> and adds a comment instead of creating a duplicate. Configuration lives in .claude/ticket-config.json under a qa section (base_url, test_plan_dir, browser, env_file, label, auth_profiles, preflight.docker_autostart). Credentials sit in a gitignored .env.qa. Playwright MCP is required only for /qa-run — install once with claude mcp add playwright npx -- @playwright/mcp@latest. The Go batch-resolve runner accepts --qa-after to spawn an isolated Claude session running /qa-run once the batch completes (default off).


batch-resolve — Go batch runner

Native Go binary with a live alt-screen TUI that processes many GitHub issues sequentially: for each issue it runs /resolve --auto, creates the PR, waits on CI, merges, then moves to the next.

Build & install:

cd ~/.claude/scripts/batch-resolve
make build
ln -sf ~/.claude/scripts/batch-resolve/build/batch-resolve ~/.local/bin/batch-resolve

Live TUI:

batch-resolve TUI

The TUI is organized in four zones:

Zone Content
Header Title, toggleable options (STOP ON FAILURE, SHUTDOWN), progress counter (0 / 4 done), elapsed time, and ETA
Current issue Active issue title with its resolve pipeline: init → fetch → analyze → explore → plan → validate → implement → simplify → review → finalize — the current step is highlighted
Issue list All issues with status icons: running, pending — with elapsed time per issue
Activity log Real-time stream of Claude's actions (file reads/writes, agent launches, skill loads) for the active issue

From the live view you can:

  • press s on a pending issue to mark it as the stop-after issue — the batch stops cleanly once that issue is done;
  • press Enter on an issue to open a contextual menu: view issue in browser, view log, view PR in browser, and stop after current task (if not already completed);
  • toggle --stop-on-failure at runtime via the options menu;
  • toggle --shutdown to power off the machine when the batch completes (great for overnight runs).

Issue input syntax:

batch-resolve 1 2 3 4 5            # explicit list
batch-resolve 10..15               # inclusive range
batch-resolve '*'                  # all open issues
batch-resolve '*' --label bug      # all open bugs
batch-resolve --milestone "v1.0"   # everything in a milestone
batch-resolve -m "Sprint 1" -l backend --sort updated
batch-resolve PROJ-123 PROJ-456    # mixed / YouTrack-style IDs

Options:

Flag Description
-m, --milestone <name> Filter by milestone (repeatable, processed in order).
-l, --label <name> Filter by label (repeatable, all must match).
--sort <field> Sort fetched issues: created (default), updated, comments.
--no-merge Create the PR but do not auto-merge.
--no-wait-ci Merge without waiting for CI checks.
--max-ci-fix <n> Max CI fix attempts per issue (default: 3).
--skip-simplify Forwarded to /resolve.
--skip-review Forwarded to /resolve.
--base <branch> Base branch (default: main).
--stop-on-failure Stop the batch on first failing issue (also toggleable in-UI).
--shutdown Power off the machine when the batch completes (toggleable in-UI).
--qa-after After the batch, spawn a separate Claude session running /qa-run (default: off).
--no-notify Disable ntfy.sh push notifications.
--dry-run Show what would run, no side effects.
--demo Simulate a full run with fake events (UI test).
-q, --quiet Suppress Claude streaming output.

Logs. Each run creates a dated folder with one log per issue:

~/.claude/logs/batch-<YYYY-MM-DD_HH-MM-SS>/issue-<id>.log

Tail a specific issue while the batch is running, or inspect it post-mortem:

tail -f ~/.claude/logs/batch-2026-04-05_22-15-03/issue-103.log
less  ~/.claude/logs/batch-2026-04-05_22-15-03/issue-103.log

Hooks

Hooks are shell commands that execute automatically in response to Claude Code lifecycle events. They enforce safety rules, inject context, log activity, and provide audio feedback. Configured in settings.json, scripts live in hooks/.

SessionStart

Hook Matcher Description
welcome.sh startup Displays a colorized quick reference from docs/welcome.txt on first launch.
session-context.sh startup|resume Injects project context: current git branch, last 5 commits, uncommitted changes, running Docker containers. Fires on both new sessions and resumed ones.
(inline) compact Reminds Claude of key rules after context compaction (PHP via docker, run linter, stay on scope).

PreToolUse — Safety guards

All fire on the Bash matcher, inspecting the command before execution.

Hook Description
(inline logger) Appends every bash command with timestamp to ~/.claude/logs/bash-commands.log.
block-main-commits.sh Blocks git commit and git push on main/master branch. Also blocks --amend and reset --hard to preserve history. Opt-out per project via allow-main-commits in CLAUDE.local.md.
block-database-access.sh Blocks direct database CLI tools (mysql, mysqldump, mysqlsh, mycli...) including via pipes, &&, and docker exec. Also blocks cloud-sql-proxy socket access. Defense-in-depth alongside deny rules.
block-destructive-git.sh Blocks destructive git operations: revert, checkout --, restore, clean, stash (except pop/apply), reset. Bypassed automatically in batch-resolve mode (CLAUDE_BATCH_RESOLVE=1).

PostToolUseFailure

Hook Description
(inline logger) Appends failed bash commands with FAILED: prefix to ~/.claude/logs/bash-commands.log.

PermissionRequest

Hook Description
auto-approve-safe.sh Auto-approves trusted operations without prompting: all MCP tools, Read/Write/Edit in .claude/ directories, docker compose, make, yarn/npm (run/test/lint/build), git/gh, user scripts, and read-only commands (find, cat, ls, wc...).

PreCompact / PostCompact

Hook Timing Description
(inline) PreCompact Injects the list of currently modified files (git diff --name-only) so they survive context compaction.
(inline) PostCompact Reminds Claude of the active plan.md and ticket.md paths from .claude-work/ after compaction.

Notification / Stop / StopFailure — Audio & logging

Hook Event Description
play-sound.js Notification Plays ~/Music/notification.mp3 when Claude asks a question or needs attention.
play-sound.js Stop Plays ~/Music/done.mp3 when Claude finishes a task.
(inline) StopFailure (authentication_failed, billing_error) Logs to ~/.claude/logs/failures.log and sends a critical push notification via notify.sh.
(inline) StopFailure (rate_limit) Logs to ~/.claude/logs/failures.log (no notification — rate limits are expected).
(inline) StopFailure (server_error, invalid_request, unknown) Logs to ~/.claude/logs/failures.log and sends a high-priority push notification.

Prerequisites

YouTrack (MCP)

{
  "mcpServers": {
    "youtrack": {
      "command": "node",
      "args": ["/path/to/youtrack-mcp/dist/index.js"],
      "env": {
        "YOUTRACK_URL": "https://your-instance.youtrack.cloud",
        "YOUTRACK_TOKEN": "your-token"
      }
    }
  }
}

GitHub CLI

sudo apt install gh       # or: brew install gh
gh auth login

Per-project config

cd /path/to/my-project
claude
> /resolve --init

Generates .claude/ticket-config.json with the keys used by the resolution workflow (default_source, youtrack, github, branches, complexity, planning, storage, pr, simplify, review).


Install

git clone <repo> ~/.claude-config
ln -s ~/.claude-config ~/.claude

Powered by Claude from Anthropic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors