Skip to content

alirezarezvani/claude-code-skill-factory / generated-skills/hook-factory

hook-factory

Flagged

Generate production-ready Claude Code hooks with interactive Q&A, automated installation, and enhanced validation. Supports 10 templates across 7 event types for comprehensive workflow automation.

examples/security-scan/hook.json

View on GitHub
{
  "PrePush": [
    {
      "matcher": {},
      "hooks": [
        {
          "type": "command",
          "command": "# Security scan before git push\necho \"Running security scan...\"\nERRORS=0\n\n# Scan for hardcoded secrets in staged changes\necho \"Checking for secrets...\"\nSECRETS_FOUND=false\n\n# Check for common secret patterns\nif git diff --cached | grep -iE '(password|api_key|secret|token)\\s*=\\s*[\"'\"'][^\"'\"']+[\"'\"']'; then\n    echo \"Warning: Potential secrets found in staged changes\"\n    SECRETS_FOUND=true\nfi\n\n# Check for AWS/Stripe/GitHub tokens\nif git diff --cached | grep -E '(AKIA|AWS|sk_live_|sk_test_|gh[ps]_)'; then\n    echo \"Error: AWS/Stripe/GitHub tokens detected in staged changes\"\n    SECRETS_FOUND=true\nfi\n\n# Check for private keys\nif git diff --cached | grep -E '-----BEGIN.*PRIVATE KEY-----'; then\n    echo \"Error: Private key detected in staged changes\"\n    SECRETS_FOUND=true\nfi\n\nif [ \"$SECRETS_FOUND\" = true ]; then\n    echo \"Security scan failed - potential secrets detected\"\n    echo \"Please remove secrets before pushing\"\n    exit 1\nfi\n\n# Run semgrep if available\nif command -v semgrep &> /dev/null; then\n    echo \"Running semgrep security scan...\"\n    if ! semgrep --config=auto --error; then\n        echo \"Semgrep found security issues\"\n        ERRORS=$((ERRORS + 1))\n    fi\nelse\n    echo \"semgrep not installed - skipping (install with: pip install semgrep)\"\nfi\n\n# Run bandit for Python if available\nif command -v bandit &> /dev/null && find . -name '*.py' -type f | grep -q .; then\n    echo \"Running bandit security scan for Python...\"\n    if ! bandit -r . -ll -f txt 2>/dev/null; then\n        echo \"Bandit found security issues\"\n        ERRORS=$((ERRORS + 1))\n    fi\nelse\n    if ! command -v bandit &> /dev/null; then\n        echo \"bandit not installed - skipping Python scan (install with: pip install bandit)\"\n    fi\nfi\n\nif [ $ERRORS -gt 0 ]; then\n    echo \"Security scan found $ERRORS issue(s) - push blocked\"\n    exit 1\nfi\n\necho \"Security scan passed!\"",
          "timeout": 120
        }
      ]
    }
  ]
}
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall