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 skills add shahidshabbir-se/my-pi-setup --skill security-best-practicesgit clone --depth 1 https://github.com/shahidshabbir-se/my-pi-setupWrote 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/skills/shahidshabbir-se/my-pi-setup/security-best-practices)<a href="https://agentmods.dev/skills/shahidshabbir-se/my-pi-setup/security-best-practices"><img src="https://agentmods.dev/badge/skills/shahidshabbir-se/my-pi-setup/security-best-practices/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/skills/shahidshabbir-se/my-pi-setup/security-best-practices"><img src="https://agentmods.dev/badge/skills/shahidshabbir-se/my-pi-setup/security-best-practices.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.00027 | $0.00715 |
| Opus 5 | $0.00014 | $0.00358 |
| Sonnet 5 | $0.00005 | $0.00143 |
| Haiku 4.5 | $0.00003 | $0.00072 |
Grade A, and why
security-best-practices 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 11d 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.
This is a copy
100% identical to security-best-practices — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Best Practices
Apply these security principles when developing backend services, microservices, and any code handling sensitive data or external inputs.
Input Validation and Sanitization
- Apply input validation and sanitization rigorously, especially on inputs from external sources
- Validate all user inputs at the boundary of your application
- Use allowlists over denylists when validating input
- Sanitize data before storing or displaying to prevent injection attacks
- Implement strict type checking and schema validation
Authentication and Authorization
- Use secure defaults for JWT, cookies, and configuration settings
- Implement proper token expiration and refresh mechanisms
- Store secrets securely using environment variables or secret management services
- Never hardcode credentials or API keys in source code
- Use secure password hashing algorithms (bcrypt, Argon2)
Permission Boundaries
- Isolate sensitive operations with clear permission boundaries
- Apply the principle of least privilege throughout the system
- Implement role-based access control (RBAC) where appropriate
- Audit and log access to sensitive resources
- Use separate service accounts for different components
Resilience and Protection
- Implement retries, exponential backoff, and timeouts on all external calls
- Deploy circuit breakers and rate limiting for service protection
- Consider distributed rate-limiting to prevent abuse across services (e.g., using Redis)
- Implement request throttling to prevent denial of service
- Use connection pooling with appropriate limits
Secure Configuration
- Use HTTPS/TLS for all network communications
- Configure secure HTTP headers (HSTS, CSP, X-Frame-Options)
- Disable verbose error messages in production
- Keep dependencies updated and scan for vulnerabilities
- Use secure defaults and fail securely
Error Handling
- Implement comprehensive error handling throughout the application
- Never expose stack traces or internal details to end users
- Log security-relevant events with appropriate detail
- Propagate context appropriately for debugging while maintaining security
- Handle authentication and authorization failures gracefully
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.
- 11d ago First seen · 105 lines · 27 tokens per session scan A 36682b40a93e
security-best-practices is a skill published in the GitHub repository shahidshabbir-se/my-pi-setup (2 stars, last pushed 3mo ago), licensed MIT. It adds 27 tokens to every session and 715 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to security-best-practices, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
composio
Build AI agents and apps with Composio - access 200+ external tools with Tool Router or direct execution.
authentication-patterns
OAuth 2.0, JWT, SSO, MFA, NextAuth/Clerk/Supabase Auth implementation patterns.
email-systems
Transactional email (Resend, SendGrid, SES), templates (React Email, MJML), deliverability (SPF/DKIM/DMARC), and inboxing best practices. Use when building email infrastructure, designing templates, or troubleshooting deliverability.
event-driven-architecture
Kafka, RabbitMQ, SQS/SNS, event sourcing, CQRS, saga patterns, dead letter queues, and idempotency. Use when designing asynchronous systems, implementing message-driven workflows, or building event streaming pipelines.
graphql-expert
GraphQL API design and implementation. Use when building GraphQL APIs, designing schemas, implementing resolvers, or optimizing GraphQL performance.
api-design
REST and GraphQL API design best practices including OpenAPI specs. Use when designing APIs, documenting endpoints, or reviewing API architecture.