specstory-guard

Install a Git pre-commit hook to scan `.specstory/history` files for secrets.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zapabob/Skills --skill specstory-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specstory-guard
Source: https://github.com/zapabob/Skills/tree/main/registry/skills/specstory-guard/variants/cursor
Command: npx skills add https://github.com/zapabob/Skills --skill specstory-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and hooks (resource) components.

What problem does it solve?

This Skill prevents accidental commits of sensitive information like API keys and passwords by scanning your .specstory/history files before each Git commit.

Core Features & Use Cases

  • Pre-commit Hook: Automatically installs a Git hook to scan files before commits.
  • Secret Detection: Identifies common patterns for API keys, tokens, and private keys.
  • Commit Blocking: Halts commits containing detected secrets, prompting for review.
  • Use Case: You're working on a feature and accidentally paste an API key into your chat history. Before you can commit your code, SpecStory Guard detects the key and blocks the commit, preventing a security breach.

Quick Start

Install the specstory guard pre-commit hook by running the command python skills/specstory-guard/scripts/setup.py install.

Frequently Asked Questions about specstory-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan for secrets before a git commit?

To scan for secrets before a git commit, you can install a pre-commit hook to automatically check files for sensitive patterns like API keys and tokens, blocking the commit if any are found. This prevents accidental exposure of credentials.

How does a pre-commit hook detect API keys in chat history files?

A pre-commit hook detects API keys by scanning your specified history files for common secret patterns. When you attempt to commit, the hook runs automatically, identifies matching strings, and halts the process to prompt for remediation.

Can I allowlist specific secrets to bypass pre-commit scanning?

Yes, you can allowlist specific secrets to bypass pre-commit scanning. This lets you configure the hook to ignore known safe patterns while still blocking commits that contain newly detected API keys or private keys.

Does this secret scanning hook work with my existing git workflow?

Yes, this secret scanning hook works with your existing git workflow by installing directly into your repository. It operates automatically during the commit process without requiring external services, ensuring local compliance before code is pushed.

What types of secrets are blocked by a pre-commit hook?

A pre-commit hook blocks commits containing common secret patterns, including API keys, tokens, and private keys. It scans your files locally and provides clear output for remediation to prevent sensitive information from being committed.