auditing-business-logic
Skill378 starsChanged 4 months agoApache-2.0View on GitHub
Analyzes authentication flows, authorization rules, middleware logic, and side-effects. Use when extracting business rules, Passport configurations, or mailer logic from an Express application.
In this repository59 other files it gives its agents.
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- batch-executing-test-suitesSkill
- circuit-breaker-reporterSkill
- generating-mock-imagesSkill
- making-forms-demoSkill
- multi-step-workflow-reporterSkill
- go-project-setupSkill
- latest-software-versionSkill
- video-descriptionSkill
- adk-memory-bank-initializerSkill
- agent-containerizerSkill
- cloud-run-agent-architectSkill
- gcp-agent-eval-engine-runnerSkill
- gcp-agent-eval-metric-configuratorSkill
- gcp-agent-golden-dataset-builderSkill
- gcp-agent-model-armor-shieldSkill
- gcp-agent-safety-gatekeeperSkill
- gcp-agent-sdp-template-factorySkill
- gcp-agent-shadow-deployerSkill
- gcp-agent-tool-trajectory-evaluatorSkill
- gcp-production-secret-handlerSkill
- mcp-connector-generatorSkill
- go-architectSkill
- go-backend-devSkill
- go-reviewerSkill
- go-test-expertSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- brand-guidelinesSkill
- knowledge_catalog_governanceSkill
- banana-breadSkill
- cheese-breadSkill
- drawingsSkill
- paintingsSkill
- photographySkill
- adding-easter-eggSkill
- building-platformer-gamesSkill
- creating-a-gameSkill
- ensuring-arcade-visualsSkill
- handling-user-inputSkill
- helping-the-userSkill
- improving-game-qualitySkill
- messaging-game-overSkill
- playing-the-gameSkill
- adversarial-verificationSkill
- auditing-api-contractsSkill
- auditing-data-modelsSkill
- auditing-paritySkill
- auditing-ui-archeologySkill
- generating-api-testsSkill
- generating-database-seederSkill
- orchestrating-greenfield-migrationSkill
- scaffolding-api-routesSkill
- scaffolding-data-layerSkill
- scaffolding-nextjs-foundationSkill
- scaffolding-test-foundationSkill
- scaffolding-ui-and-pagesSkill
- ping_pong_pairingSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 27
Authorization (AuthZ): Document the logic used for access control.
- Very specific: line 31
External Services: Check package.json and controllers for Stripe (Payments), Twilio (SMS), SendGrid (Email), etc.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Auditing Business Logic & Side-Effects
Analyze the implicit "rules" and external behaviors of a legacy application to ensure they are accurately replicated in the modern architecture.
Objective
Reverse-engineer the application's authentication flows, authorization logic (RBAC/ABAC), and any asynchronous side-effects (Mailers, External APIs, File Storage).
Instructions for the Audit Subagent
Copy this checklist and track your progress:
Task Progress:
- [ ] Step 1: Analyze AuthN & AuthZ Flows
- [ ] Step 2: Map Side-Effects (External APIs, Mailers)
- [ ] Step 3: Analyze Global Middleware
- [ ] Step 4: Draft Modernization Advisory
- [ ] Step 5: Generate Business_Logic_Rules.mdStep 1. Analyze AuthN & AuthZ Flows
- Authentication (AuthN): Locate Passport, session, or JWT configurations (e.g.,
config/passport.js). Document the login strategies (Local, OAuth, etc.) and required fields. - Authorization (AuthZ): Document the logic used for access control. How does the system verify a user's role or ownership of a Primary Resource? (e.g.,
requiresRole('admin')orisOwner(resource_id)).
Step 2. Map Side-Effects
Identify actions that occur outside of the primary request/response cycle:
- External Services: Check
package.jsonand controllers for Stripe (Payments), Twilio (SMS), SendGrid (Email), etc. - Mailers: Audit the
mailer/orservices/email/directory. Does creating a resource trigger an automated notification? - File Storage: Locate file upload configurations (e.g., Multer). Determine where assets are stored (Local Disk vs Cloud Storage).
Step 3. Analyze Global Middleware
Examine app.js or config/express.js. Document global middlewares such as helmet, cors, custom loggers, or csurf. Determine which remain relevant for a modern Next.js API.
Step 4. Provide Modernization Advisory
Flag potential pitfalls for the modern stack (e.g., Next-Auth vs Passport). Recommend modern equivalents for legacy side-effects (e.g., moving from local file storage to S3/Uploadthing).
Step 5. Generate Business_Logic_Rules.md & Identify Probes
Compile findings into docs/legacy-audit/Business_Logic_Rules.md. Additionally, identify specific logic-parity probes (e.g., "Attempt to submit a form without the required OAuth session to verify the redirect loop matches legacy"). Append these logic-specific test cases to docs/verification/Verification_Plan.md.
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
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.

