Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/ekakit/lightfast-mcpnpx agentmods add rules/ekakit/lightfast-mcp/pre-commit-workflowWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/ekakit/lightfast-mcp/pre-commit-workflow)<a href="https://agentmods.dev/rules/ekakit/lightfast-mcp/pre-commit-workflow"><img src="https://agentmods.dev/badge/rules/ekakit/lightfast-mcp/pre-commit-workflow/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/ekakit/lightfast-mcp/pre-commit-workflow"><img src="https://agentmods.dev/badge/rules/ekakit/lightfast-mcp/pre-commit-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.01300 |
| Opus 5.5 | $0.00004 | $0.00520 |
| Sonnet 5.5 | $0.00002 | $0.00260 |
| Haiku 4.5 | $0.00001 | $0.00130 |
Grade A, and why
pre-commit-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pre-Commit Workflow
Before committing any changes to lightfast-mcp, execute this comprehensive validation workflow:
Mandatory Pre-Commit Steps
- Format and Lint: Ensure code style compliance
- Run Tests: Execute comprehensive test suite
- Validate Configs: Check all configuration files
- Test Server Startup: Verify servers can start
- Security Check: Run security validation
- Type Check: Ensure type safety
Automatic Pre-Commit Commands
Run this command sequence before every commit:
#!/bin/bash
echo "🚀 Running lightfast-mcp pre-commit checks..."
# Step 1: Format and Lint
echo "📝 Step 1: Formatting and linting..."
uv run task format
uv run task lint
# Step 2: Fast tests for immediate feedback
echo "⚡ Step 2: Running fast tests..."
nox -s test_fast
# Step 3: Configuration validation
echo "⚙️ Step 3: Validating configurations..."
find config -name "*.yaml" -exec python -c "import yaml; yaml.safe_load(open('{}'))" \; 2>/dev/null
find . -name "*.json" -exec python -c "import json; json.load(open('{}'))" \; 2>/dev/null
echo "✅ Configuration files validated"
# Step 4: Test server startup
echo "🏁 Step 4: Testing server startup..."
timeout 10 uv run lightfast-mock-server &
MOCK_PID=$!
sleep 3
kill $MOCK_PID 2>/dev/null || true
echo "✅ Mock server startup tested"
# Step 5: System integration test
echo "🧪 Step 5: System integration test..."
nox -s verify_system
# Step 6: Type checking
echo "🔍 Step 6: Type checking..."
nox -s typecheck
# Step 7: Security check
echo "🔒 Step 7: Security check..."
python -m py_compile $(find src -name "*.py")
echo "✅ Python compilation successful"
echo "✨ All pre-commit checks passed!"
File-Type Specific Validations
For Server File Changes
# Additional checks when server files are modified
echo "🖥️ Server-specific validations..."
# Test MCP protocol compliance
uv run pytest tests/unit/test_*server*.py -v
# Validate tool decorators and signatures
python -c "
import ast
import glob
for file in glob.glob('src/lightfast_mcp/servers/**/*.py', recursive=True):
with open(file) as f:
tree = ast.parse(f.read())
# Check for @mcp.tool() decorators
print(f'Validated: {file}')
"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 206 lines · 10 tokens per session scan A 23e12ec55594
pre-commit-workflow is a cursor rule published in the GitHub repository ekakit/lightfast-mcp (2 stars, last pushed 1y ago), licensed MIT. It adds 10 tokens to every session and 1,300 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
git
Git workflow — commit format, push policy, and PR process.
commits
Conventional Commits standards for clear, semantic commit messages.
no-ai-contributors
Never add AI tools as git authors or project contributors.
conventional-commits
Use the Conventional Commit Messages specification to generate commit messages.
git-discipline
Commit, push, and branching rules. Owns ALL git behavior; other files state only their deviations.
git-commit-standards
Enforce structured Git commit messages.