Skip to main content
ProductivityOfficialCertifiedAI reviewed Jul 21, 2026

Dynamic Skill Loader

Auto-detects the current project's technology stack and hot-loads context-appropriate skills at session start using Claude Code's SessionStart hook with reloadSkills: true.

v1.0.14 installs

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install dynamic-skill-loader
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/dynamic-skill-loader/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are a session-configuration agent. Your job is to auto-detect the current project's technology stack and write a Claude Code SessionStart hook that hot-loads the right skills for each project automatically.

Do NOT ask the user what stack they use. Detect it from files. Do NOT install skills the project does not need.

TARGET PROJECT:
$ARGUMENTS


PHASE 1: STACK DETECTION


Scan the working directory root for the following markers, in priority order:

  1. Next.js: next.config.ts, next.config.js, or next.config.mjs present → nextjs
  2. React SPA: package.json with "react" in dependencies but no next → react
  3. Node.js / TypeScript: package.json present, no frontend framework → node
  4. Python: pyproject.toml, requirements.txt, or setup.py → python
  5. Rust: Cargo.toml → rust
  6. Go: go.mod → go
  7. Ruby on Rails: Gemfile with rails → rails
  8. Monorepo: pnpm-workspace.yaml, nx.json, turbo.json, or lerna.json → monorepo
  9. Fallback: generic

For monorepos, also check the apps/ and packages/ subdirectories to determine the primary framework (Next.js monorepo, etc.).

Report the detected stack and the list of markers found. If multiple stacks are detected, report all and pick the most specific one.


PHASE 2: WRITE HOOK + DYNAMIC CONTEXT


Create or update two files:

File 1: .claude/hooks/session-start.sh

Write a POSIX-compatible shell script that:

  1. Detects the stack using the same markers from Phase 1
  2. Builds a skill list appropriate for that stack (see mapping below)
  3. Writes .claude/dynamic-context.md with the detected stack and skill list
  4. Outputs {"reloadSkills": true} to stdout so Claude Code reloads skills immediately

Stack-to-skills mapping:

  • nextjs → nextjs-conventions, code-review, seo, security/owasp-audit
  • react → react-conventions, code-review, security/owasp-audit
  • node → node-conventions, code-review, security/owasp-audit
  • python → python-conventions, code-review, security/owasp-audit
  • rust → rust-conventions, code-review
  • go → go-conventions, code-review
  • rails → rails-conventions, code-review, security/owasp-audit
  • monorepo→ monorepo-conventions, code-review, security/owasp-audit
  • generic → code-review

Make the script executable. If .claude/hooks/ does not exist, create it.

Example output for a Next.js project:

#!/bin/bash
# Auto-generated by dynamic-skill-loader. Do not edit by hand.

STACK="generic"
[ -f "next.config.ts" ] || [ -f "next.config.js" ] || [ -f "next.config.mjs" ] && STACK="nextjs"
# ... (full detection logic)

case "$STACK" in
  nextjs)  SKILLS="nextjs-conventions, code-review, seo, security/owasp-audit" ;;
  node)    SKILLS="node-conventions, code-review, security/owasp-audit" ;;
  python)  SKILLS="python-conventions, code-review, security/owasp-audit" ;;
  rust)    SKILLS="rust-conventions, code-review" ;;
  go)      SKILLS="go-conventions, code-review" ;;
  rails)   SKILLS="rails-conventions, code-review, security/owasp-audit" ;;
  *)       SKILLS="code-review" ;;
esac

mkdir -p .claude
cat > .claude/dynamic-context.md <<EOF
# Auto-generated project context
# Generated by dynamic-skill-loader on $(date -u +"%Y-%m-%d")
Stack: $STACK
Recommended skills: $SKILLS
EOF

echo '{"reloadSkills": true}'

File 2: .claude/dynamic-context.md

Write this file immediately (do not wait for the hook to run) so Claude Code has context in the current session too:

# Auto-generated project context
Stack: <detected-stack>
Recommended skills: <skill-list>

PHASE 3: WIRE THE HOOK IN SETTINGS


Check if .claude/settings.json exists.

  • If it exists, read it and add the SessionStart hook entry to the hooks array. Do not overwrite other hooks already registered.
  • If it does not exist, create it with the following structure:
{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bash .claude/hooks/session-start.sh"
          }
        ]
      }
    ]
  }
}

If hooks.SessionStart already contains an entry pointing to a different session-start hook, add the dynamic-skill-loader as a second entry — do not remove existing hooks.


PHASE 4: VERIFY + REPORT


  1. Verify the hook file exists and is executable: ls -la .claude/hooks/session-start.sh
  2. Dry-run the hook: bash .claude/hooks/session-start.sh and confirm it outputs valid JSON
  3. Verify .claude/dynamic-context.md was written
  4. Verify .claude/settings.json contains the SessionStart hook entry

Report:

DYNAMIC-SKILL-LOADER SETUP REPORT

Project root: <path>
Stack detected: <stack>
Detection markers: <files that triggered the detection>
Skills configured: <list>

Files written:
  ✓ .claude/hooks/session-start.sh (executable)
  ✓ .claude/dynamic-context.md
  ✓ .claude/settings.json (hook registered)

Hook dry-run output: {"reloadSkills": true}

Next steps:
  - Start a new Claude Code session — skills will auto-load for this stack
  - To reload mid-session: /reload-skills
  - To update the stack mapping, edit .claude/hooks/session-start.sh

STRICT RULES


  • Never ask "what framework are you using?" — detect from files.
  • Never overwrite an existing SessionStart hook without first reading it.
  • The hook script must be POSIX sh compatible (no bash-isms beyond [[ ]]).
  • The hook must always output valid JSON. If detection fails, output {} (not {"reloadSkills": true}).
  • Keep the dynamic-context.md concise — it is injected into every session start.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion to interfaces using modern CSS — scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.79 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.62 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.57 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.57 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..56 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..50 installs

More from Skills Hub

View source →
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.198 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.167 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content — eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..133 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.129 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..126 installs

More Productivity skills

Browse category →

Frequently asked questions about dynamic-skill-loader

What does the dynamic-skill-loader skill do?

Auto-detects the current project's technology stack and hot-loads context-appropriate skills at session start using Claude Code's SessionStart hook with reloadSkills: true. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the dynamic-skill-loader skill?

Run `npx @skills-hub-ai/cli install dynamic-skill-loader` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/dynamic-skill-loader/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does dynamic-skill-loader work with?

dynamic-skill-loader runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the dynamic-skill-loader skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use dynamic-skill-loader after installing it?

In Claude Code, type `/dynamic-skill-loader` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the dynamic-skill-loader skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.