← Back to Leaderboard
FPenglinChina

PenglinChina/footgun-guard

A four-layer local guard for coding agents, from review guidance to CI checks

View on GitHub ↗
Engineering Health (Methodology)
A · 76/100
Maintenance Activity
● Updated 2d ago
Latest Release
v0.1.0
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption1/25
Release Cadence20/20
License Clarity20/20
CLI
Total Stars
★ 77
24h Growth
+1
7d Growth
+76
Forks
0

GitHub Star History

Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.

PenglinChina/footgun-guard Star History (2026-11-26 - 2026-12-03) DAILY STAR HISTORY (8-DAY D1 TELEMETRY) +76 in 7d · avg +11/day 81 41 0 2026-11-26: ★ 12026-11-27: ★ 12026-11-28: ★ 362026-11-29: ★ 492026-11-30: ★ 752026-12-01: ★ 762026-12-02: ★ 762026-12-03: ★ 77 ★ 77 11-26 11-29 12-03

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

FootgunGuard separates four responsibilities: agent instructions, local detection, post-edit feedback, and CI enforcement. skill/SKILL.md and AGENTS.md guide the agent; src/cli.js routes commands to a dependency-free JavaScript engine. The engine identifies the language, masks comments and strings, and applies rules to source text and nearby context. Rules in src/rules/ map to stable IDs in the Chinese and English GuardLists; manual entries have no detector.

src/commands/hook.js returns findings to the agent as non-blocking additionalContext. CI consumes the scanner's exit status independently of the agent. The integration surface is a local CLI, skill bundles, and host hooks; no MCP transport or server entrypoint is shown.

Key Capabilities & Differentiators

Coverage spans C, C++, C#, Java, JS/TS, Python, Go, and Rust. The current GuardLists contain 80 entries, including deliverable-quality checks; that is not a count of automated detectors. doctor checks mapping completeness and hook wiring, list --manual identifies checks that require review, and explain looks up a rule. The fixture tests check that each language's positive sample hits all of its detectable checklist items and that its clean sample produces no findings.

detect supports JSON, SARIF, and GitHub-oriented output. It returns 0 for a clean scan, 2 for findings, and 1 if a target cannot be scanned. The SARIF upload example deliberately accepts exit 2 so the report can be uploaded. To block merges on findings, configure a required CI check that treats 2 as a failure.

Trade-offs & Limitations

Compared with relying on ESLint and similar language-specific linters alone, FootgunGuard adds a shared review baseline and an edit-to-agent feedback loop across languages. It does not replace richer language tooling: the scanner does not follow cross-function data flow, expand macros, or infer types across files. It treats .h files as C and skips code embedded in masked strings or comments.

Deterministic output makes recurring findings reproducible, not necessarily correct. Context heuristics can still raise false positives, while questions such as whether a test independently validates a requirement need human judgment. Start by reviewing findings on representative code before making the check mandatory. An exit code of 0 confirms only that the enabled detectors found nothing.

Hardware & Deployment Guide

Use Node.js 18.19.0 or newer. The package exposes the footgun binary, but the checkout-based path avoids relying on npm publication: node src/cli.js detect . runs directly from the repository. The scanner needs neither a model API nor a GPU and can run offline on developer machines or CI runners. Start with the intended scan paths when evaluating runtime cost; no resource measurements are available.

For skill installation, node scripts/install.mjs --host claude targets the current project; --scope global selects a user-level install for supported paths. Claude Code's settings snippet and the DSH plugin provide separate hook wiring. Twenty generated host directories are checked in with bundled scanner copies, and node scripts/build.mjs --check verifies that those artifacts match their sources. v0.1.0 is the first integration release.

Rule traceability: Chinese and English GuardLists share stable IDs and ordering, enforced by tests.
Detection engine: Dependency-free Node.js scanning masks comments and strings before applying pattern and context checks.
Manual review: footgun list --manual exposes checklist items that have no detector.
Agent feedback: Post-edit hooks return findings as non-blocking additionalContext.
CI policy: JSON, SARIF, and GitHub-oriented output are available; exit 2 means findings and exit 1 means a scan failure.
Host distribution: Twenty generated skill directories bundle the scanner, and build --check detects drift from source.
Best For

Polyglot teams using coding agents that want a shared review baseline, immediate post-edit feedback, and a local CI check whose failure policy they control.

Skip If

You need an MCP endpoint, deep interprocedural analysis, or a tool that can certify code safety from a clean scan.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

CLI
node src/cli.js detect .              # 扫当前目录
node src/cli.js detect src/ --json    # 机器可读
node src/cli.js context               # 打印给 agent 的常驻指令块
node src/cli.js list --manual         # 列出没有检测器的条目
node src/cli.js explain c-unsafe-string-fn   # 查一条规则
node src/cli.js doctor                # 自检:规则完整性、hook 接线

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
footgun-guard ★77+76JavaScriptMITA four-layer local guard for coding agents, from review guidance to CI checks
taste-skill125.3k+2.9kJavaScriptMITAn agent skill for directing company website design and checking builds in a bro
agent-skills122.5k+1.7kJavaScriptMITA modular skill pack for consistent coding-agent workflows, from spec to release
archify103.1k+2kJavaScriptApache-2.0Agent skill and Node CLI for source-backed, interactive architecture diagrams.

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/PenglinChina/footgun-guard.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

PenglinChina/footgun-guard Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about footgun-guard

How do I connect it to Claude Code, and do I need an MCP server?

The documented integration uses skills, a local CLI, and post-edit hooks; no MCP transport or server entrypoint is shown. For Claude Code, install the skill with node scripts/install.mjs --host claude. To add post-edit feedback, separately merge hooks/claude-settings.json into .claude/settings.json. Run node src/cli.js doctor to check rule coverage and hook wiring.

What hardware and runtime does scanning require?

The detector requires Node.js 18.19.0 or newer and runs without external dependencies, a GPU, or VRAM. Its workload depends on the files scanned; scanning a directory and checking an edited file are different workloads. Any model or API costs belong to the coding-agent host, not the detector.

Can a company run it internally or redistribute it?

Yes. The MIT license allows commercial use, modification, and redistribution, provided the copyright and permission notices are retained in copies or substantial portions. The scanner can run on a developer machine or an internal CI runner without calling a model API. Review the agent host's data-handling settings separately.

Should it replace language linters or a deeper static analyzer?

No. Keep language-specific linting, compiler checks, and tests as primary controls. FootgunGuard adds a shared checklist across languages, post-edit reminders, and review guidance for items that cannot be checked reliably from source text. For cross-function data-flow analysis, use an analyzer built for that job.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining PenglinChina/footgun-guard? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature PenglinChina/footgun-guard on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare