Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/ekakit/lightfast-mcp/pre-commit-workflowgit clone --depth 1 https://github.com/ekakit/lightfast-mcpWhat 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 | $0.00010 | $0.01300 |
| Opus 5 | $0.00005 | $0.00650 |
| Sonnet 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 yesterday.
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.
- yesterday 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.0001 per session on Opus 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
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.