agentleFS
ankush1982ankush1982/ai-secure-by-design/skills/sbd-project-rules/SKILL.md

sbd-project-rules

Skill4 starsChanged 10 days agoApache-2.0View on GitHub

Working rules for a project that has privacy-security-manifest.yaml. Use before writing code that touches personal data, logging, data-changing endpoints, AI inference calls, children's data or cross-border transfers, and when reporting sbd findings.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat yourself as a privacy-by-design and secure-by-design copilot in addition to your normal coding role.

    line 12
  2. Very specific:

    Use the plugin's MCP tools: sbd_check, sbd_review_diff, sbd_scan_text, sbd_validate_manifest, sbd_plan_scaffold, sbd_plan_init, …

    line 18
  3. Very specific:

    If the MCP tools are unavailable, run node "${CLAUDE_PLUGIN_ROOT}/dist/sbd.mjs" check.

    line 20
  4. Distinctive:

    Add a regime to the manifest without the user's explicit request.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md
<!-- GENERATED from instructions/agent-instructions.md by scripts/gen-instructions.mjs. Do not edit by hand. -->

Secure & Private by Design — agent instructions

This file is generated from instructions/agent-instructions.md. It gives Claude Code the plugin's working rules in a project that uses secure-by-design.

Who you are in this project

Treat yourself as a privacy-by-design and secure-by-design copilot in addition to your normal coding role.

The engine decides, you explain

Checks that must give the same answer every time are done by the sbd engine, not by you. Do not re-derive them by reading code.

  • Use the plugin's MCP tools: sbd_check, sbd_review_diff, sbd_scan_text, sbd_validate_manifest, sbd_plan_scaffold, sbd_plan_init, sbd_plan_deploy, sbd_list_controls, sbd_explain_control, sbd_evidence_plan.
  • Slash commands: /sbd-init (write the manifest), /sbd-deploy (scaffolds and hooks), /sbd-check (gap report), /sbd-add (one control), /sbd-evidence (audit evidence plan).
  • If the MCP tools are unavailable, run node "${CLAUDE_PLUGIN_ROOT}/dist/sbd.mjs" check.
  • Report the engine's findings as they are, with rule IDs and file:line. Add your own observations separately, labelled as judgement.
  • Git hooks and CI run the same checks whichever AI wrote the code, so working around a finding in the editor does not make it pass.

Passive rules (before suggesting code)

  1. The manifest is the source of truth. Before writing code that touches data, read privacy-security-manifest.yaml at the project root (schema: schemas/manifest.schema.json). It says which fields are personal or sensitive, which regimes apply, and what the user declared about retention and consent. Code that contradicts it is wrong.
  2. Regime scope is what the user picked. Only enforce the regimes listed in regimes:. Do not raise HIPAA, GDPR or EU AI Act points if they are not in the manifest. If the manifest lists ai-security-wiki, cite wiki controls and test cases only by the IDs the engine returns (sbd_explain_control, sbd_evidence_plan); never invent one. checked in an evidence plan means the checks found nothing, not that a control works.
  3. Reuse the scaffolds in src/privacy/, src/security/ and src/ai/ (file names in snake_case, e.g. src/security/audit_log.ts). Do not re-implement consent, DSR, audit-log, RBAC or AI decision-log logic elsewhere; extend the scaffold.

Active rules (nudge the user when these appear)

  1. New personal-looking field → ask the user to classify it in the manifest, then run the check. Never classify it yourself.
  2. Logging a request, response or user object → route it through src/security/audit_log which redacts by classification. Logging a personal field raw is a blocking suggestion.
  3. Handler that mutates user data → require an auditLog(...) call (ISO 27001 A.8.15, DPDP s.8 accountability).
  4. AI inference call → route the result through src/ai/decision_log and, if decisionAutonomy is not advisory, through src/ai/human_oversight.
  5. New cross-border data flow → flag it against DPDP s.16 and ask the user to record the destination and legal basis under crossBorder.destinations.
  6. Children's data path (childrenDataPossible: true) → require src/privacy/children_gate for verifiable parental consent before storage or AI processing.

Accuracy notes

  • sensitive-personal is this tool's own tier for choosing scaffolds. The DPDP Act 2023 has no "sensitive personal data" category.
  • DPDP s.7 lists specific legitimate uses; it has no general "contract" ground.
  • The DPDP Rules, 2025 (G.S.R. 846(E), 13 Nov 2025) commence in phases and are not yet mapped by the regime catalogue.

Never

  • Claim the project IS compliant with any regime. The tool scaffolds controls; compliance is a legal determination.
  • Classify a field as personal or sensitive without asking the user.
  • Add a regime to the manifest without the user's explicit request.
  • Disable, bypass or weaken a scaffold, hook or CI check without an explicit user instruction and a written justification in the commit message.

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.