agentleFS
Twodragon0Twodragon0/claudesec/CLAUDE.md

claudesec

CLAUDE.md16 starsChanged 6 months agoMITView on GitHub

ClaudeSec is a DevSecOps toolkit for AI-assisted secure development. All documentation is in Markdown. No build system required. Project agents live in .claude/agents/ (the sec-* and ci-pipeline roles). architect, test-engineer, and explore below are generic roles from the global oh-my-claudecode catalog, not project-scoped files. Model selection: Key workflows: Token budget: prefer haiku subagents for read-only exploration. Use run_in_background for scans/builds.

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All documentation is in Markdown.

    line 6
  2. Very specific:

    Read specific line ranges, not entire files: Read(file, offset=10, limit=30)

    line 52
  3. Distinctive:

    Use Grep/Glob instead of Bash for file search — dedicated tools are cheaper

    line 53
  4. Very specific:

    Prefer run_in_background for scans, builds, tests — frees context for other work

    line 55
  5. Distinctive:

    Keep slash command outputs concise — scanner summary, not full report

    line 56
  6. Distinctive:

    When compacting, always preserve the full list of modified files and test commands

    line 58
  7. Very specific:

    Run scanner shell tests directly: bash scanner/tests/test_<name>.sh.

    line 62
  8. Distinctive:

    All Markdown must pass markdownlint

    line 67
  9. Distinctive:

    Keep a single CodeQL model: repository default setup only.

    line 74
  10. Very specific:

    Treat external action download 401 as transient by default: rerun failed workflow up to 2 times before manual triage.

    line 76
  11. Distinctive:

    Use hourly automation for repository synchronization, scanner execution, and dashboard refresh.

    line 87
  12. Very specific:

    Use MEMORY.md to keep a persistent backlog across security, performance, operations, quality, and UX.

    line 88
  13. Very specific:

    Use /ralph-loop for autonomous iteration and /ulw-loop for deep-focus execution on highest-priority items.

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

ClaudeSec Project Instructions

Project Overview

ClaudeSec is a DevSecOps toolkit for AI-assisted secure development. All documentation is in Markdown. No build system required.

Conventions

  • Markdown files use YAML frontmatter with title, description, tags
  • File names: kebab-case
  • Code examples must be tested and runnable
  • Security advice must reference authoritative sources (OWASP, NIST, CIS)

Directory Layout

  • docs/devsecops/ — DevSecOps pipeline and practices
  • docs/github/ — GitHub security features
  • docs/ai/ — AI and LLM security
  • docs/guides/ — Step-by-step tutorials
  • docs/compliance/ — NIST, ISO, ISMS-P compliance guides
  • docs/architecture/ — Architecture and flow diagrams
  • docs/reports/ — Session reports, retrospectives, and generated scan/seminar collateral
  • docs/plans/ — Strategy and planning documents
  • assets/ — Logo and branding assets
  • templates/ — Reusable config templates
  • scanner/ — Security scanner CLI
  • scripts/ — Automation scripts
  • hooks/ — Claude Code security hooks
  • examples/ — Example projects and configs

Agents & Model Routing

Project agents live in .claude/agents/ (the sec-* and ci-pipeline roles). architect, test-engineer, and explore below are generic roles from the global oh-my-claudecode catalog, not project-scoped files. Model selection:

  • opus: sec-orchestrator, architect — coordination, architecture, security audit
  • sonnet: sec-implementer, sec-researcher, sec-reviewer, ci-pipeline, test-engineer — standard work
  • haiku: explore, docs lookup, quick validation — lightweight tasks

Key workflows:

  • Security guide: researcher → implementer → writer → reviewer → test
  • Scanner feature: architect → implementer → test → ci-pipeline
  • Hotfix: researcher → implementer → reviewer

Token budget: prefer haiku subagents for read-only exploration. Use run_in_background for scans/builds.

Token Optimization

  • Read specific line ranges, not entire files: Read(file, offset=10, limit=30)
  • Use Grep/Glob instead of Bash for file search — dedicated tools are cheaper
  • Subagents for exploration: always use model: "haiku" for read-only tasks
  • Prefer run_in_background for scans, builds, tests — frees context for other work
  • Keep slash command outputs concise — scanner summary, not full report
  • Autocompact at 70%: run /compact manually at logical milestones for better quality
  • When compacting, always preserve the full list of modified files and test commands

Local Testing

  • Run scanner shell tests directly: bash scanner/tests/test_<name>.sh.
  • Set CLAUDESEC_DASHBOARD_OFFLINE=1 for any test that calls generate_html_dashboard. Without it, dashboard-gen.py makes live GitHub API calls and the test can hang for minutes. The kcov coverage job sets this at the job level and every such test also self-exports it (PR #190/#191). List them with grep -l generate_html_dashboard scanner/tests/*.sh, never from a count written here — this line said three when there were five.

Quality Gates

  • All Markdown must pass markdownlint
  • Links must be valid (no broken references)
  • Code blocks must specify language
  • Security claims must cite sources

GitHub Actions Policy

  • Keep a single CodeQL model: repository default setup only; do not add duplicate repo-level CodeQL workflow files.
  • Require local pre-PR validation for docs changes: markdownlint "**/*.md" and lychee "**/*.md".
  • Treat external action download 401 as transient by default: rerun failed workflow up to 2 times before manual triage.
  • For Dependabot action PR conflicts: apply required action-version updates directly to main, then close duplicate/conflicting Dependabot PRs with rationale.

Continuous Operations

  • Hourly automation entrypoint: see docs/guides/hourly-operations.md
  • OpenCode profile: OPENCODE.md
  • Improvement memory: MEMORY.md

Continuous Improvement Workflow

  • Use hourly automation for repository synchronization, scanner execution, and dashboard refresh.
  • Use MEMORY.md to keep a persistent backlog across security, performance, operations, quality, and UX.
  • Use /ralph-loop for autonomous iteration and /ulw-loop for deep-focus execution on highest-priority items.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.