
coding
MUST use for all coding related tasks - includes general coding best practices and software engineering principles to build robust, maintainable, and scalable software.
- Installs
- 392
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/davidkiss/smart-ai-skills --skill coding- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads coding automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
General Coding Best Practices
Overview
This skill provides a set of core principles and practices for software development. Use this when implementing new features, refactoring existing code, or reviewing code to ensure high quality and maintainability.
Core Principles
- DRY (Don't Repeat Yourself): Avoid logic duplication. If you find yourself writing the same code twice, abstract it.
- KISS (Keep It Simple, Stupid): Prefer simple, straightforward solutions over complex ones. Avoid over-engineering.
- YAGNI (You Ain't Gonna Need It): Don't implement features or abstractions until they are actually needed.
- SOLID Principles:
- Single Responsibility: A class/function should have one reason to change.
- Open/Closed: Software entities should be open for extension but closed for modification.
- Liskov Substitution: Subtypes must be substitutable for their base types.
- Interface Segregation: Many client-specific interfaces are better than one general-purpose interface.
- Dependency Inversion: Depend on abstractions, not concretions.
- Existing Guidelines: - Follow existing guidelines in the project (e.g. CLAUDE.md, AGENT.md, etc.)
Implementation Guidelines
- Clean Code: Use descriptive names for variables, functions, and classes. Write code that is easy to read and understand.
- Small Functions: Keep functions small and focused on a single task.
- Error Handling: Use proactive error handling. Validate inputs and handle exceptions gracefully.
- Documentation: Document the why, not the what. Use self-documenting code where possible.
- Security: Sanitize inputs, avoid hardcoding secrets, and follow the principle of least privilege.
- Performance: Be mindful of time and space complexity, but avoid premature optimization.
Automated Analysis & Quality Control
- Static Analysis & Linting: Every project MUST have automated linting, formatting and static analysis (e.g., ESLint, Prettier, Ruff, Sonar).
- Check: Identify if these tools are configured.
- Propose: If missing, immediately propose adding them (e.g.,
npm install --save-dev eslint).
- Automated Tests: Ensure there is a test runner configured (e.g., Jest, Pytest).
- Check: Look for
tests/directory or test configurations inpackage.json/pyproject.toml. - Propose: If missing, propose a testing framework and initial setup.
- Check: Look for
Verifying Code Changes
Before completing any task, you MUST perform the following verification loop:
- Simplification: Use the code-simplifier plugin to make the code cleaner and more maintainable.
- Self-Code Review:
- Review the changes against the task requirements.
- Ensure compliance with this
codingskill (DRY, KISS, SOLID). - Check for potential security vulnerabilities or performance regressions.
- Static Analysis & Linting:
- If project does not have linting/formatting configured, propose adding it.
- Run the project's linting/format commands (e.g.,
npm run lint,prettier --check .). - Fix all reported issues.
- Unit Testing:
- If project does not have a test runner configured, propose adding one.
- Add Missing Tests: If new logic was added, write concise unit tests covering the happy path and edge cases.
- Run Tests: Execute the test suite (e.g.,
npm test,pytest). - Verification: Ensure all tests pass. If they fail, fix the implementation or the test.
Key Principles
- Clarity over Cleverness: Write code for humans first, machines second.
- Consistency: Follow the established patterns and style of the existing codebase.
- Composition over Inheritance: Prefer combining simple objects to build complex ones rather than creating deep inheritance hierarchies.
FAQ
What does the coding skill do?
MUST use for all coding related tasks - includes general coding best practices and software engineering principles to build robust, maintainable, and scalable software.
How do I install coding?
Run npx skills add https://github.com/davidkiss/smart-ai-skills --skill coding in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/coding/ (personal) or .claude/skills/coding/ (project).
Which AI agents can use coding?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is coding safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains coding?
It is published by davidkiss in davidkiss/smart-ai-skills. It has 392 recorded installs.
More from davidkiss/smart-ai-skills
reflection
davidkiss/smart-ai-skills
MUST use this skill when user provides feedback / ask to do things in certain way, or when a tool call fails - for self-improvement - to learn user preferences and store them in AGENT.md / CLAUDE.md, and to propose improvements to skills.
task-breakdown
davidkiss/smart-ai-skills
Use when you have specs or requirements for a multi-step task to break it down into detailed tasks, before executing it
subagent-task-execution
davidkiss/smart-ai-skills
Open the skill to read its SKILL.md instructions.
brainstorming
davidkiss/smart-ai-skills
You MUST use this skill before any creative or complex work. Explores user intent, requirements and design before actually executing on the task.
skill-editor
davidkiss/smart-ai-skills
Creates, updates, and manages Agent Skills following the Claude Code style. Use this skill when the user wants to add a new capability, create a new skill, or modify an existing skill.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.