
ds-principles
Compact engineering principles for design, debugging, verification, and delegation, each with a trigger. Use when choosing structure or types, sizing a diff, debugging, writing tests, or when the user types /ds-principles.
- Installs
- 587
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/aicodeking/deepseek-stack --skill ds-principles- 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 ds-principles 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.
Engineering principles
If a trigger matches, apply the rule. Name principles that changed a decision.
Design
- Subtract, then add little. Remove dead code and stale checks first, then make the shortest diff that works. No abstraction with one user. Apply when sizing a diff or tempted to add a layer.
- Data shape first. Choose the core types and structures before logic. Apply before writing new logic.
- Model the domain. Put states in one structure, such as a typed union, state machine, or lookup table, not scattered conditionals. Apply when code branches a lot or repeats a shape across files.
- Redesign for the new need. Fit a new requirement as if it existed from day one. Apply when an addition strains the design.
- Low reader load. Inline one-caller wrappers and shrink mutable scope. Apply when code is hard to trace.
- Guards at boundaries. Validate where input enters: CLI, config, network, files, external APIs. Trust types inside and keep core logic pure. Apply when adding validation or error handling.
- Idempotent steps. Rerunning a step, even after a crash, reaches the same state. Apply to commands, setup, and retries.
- No shared writers. Give each concurrent actor its own file, branch, or key before using locks. Apply when parallel work touches shared state.
- Migrate, then delete. Move every caller and delete the old API in one change. No shims. Apply when replacing an API or rewriting in phases.
- Compare options. For an unprecedented design, sketch two or three. Prefer fewer, polished features. Apply to novel architecture, UX, or scope choices.
Debugging and verification
- Fix root causes. Fix where state first went wrong. A guard fixes only legitimate states. Apply when debugging.
- Attack the premise. After two failed fixes that share an assumption, write it down and test it directly. Apply before a third attempt.
- Prove it works. Run the real thing and read the actual output, not a proxy. Apply before claiming done.
- Verifiable units. Split work into steps that each end in a passing check. Apply to sweeps, migrations, and stacked commits.
- Test behavior. Assert what callers can observe, so tests survive refactors. Apply when writing or keeping a test.
- Explain the number. Find what limits a measurement and confirm it measured the right work. Apply to benchmarks and eval scores.
- Build the tool. Script bulk or repeated work so it can be rerun. Apply to large edit sets or checks.
Process
- Guard the context. Keep summaries, not dumps. Send bulk reading to subagents. Apply when outputs or files are large.
- Do not block on the human. On reversible work, proceed and show the result. Apply when tempted to ask "should I?".
- Encode repeated lessons. A correction given twice becomes a lint, test, or script. Apply when a mistake recurs.
- Comments explain why. Keep a comment only for a reason the code cannot show, such as an external constraint or a public API contract. Delete narration and dead code. Fix code whose surprise needs a comment. Apply when writing or reviewing code.
Types
- Make illegal states unrepresentable. Use discriminated unions, not optional-field bags.
- Parse external data once at the boundary into a named type. Trust it inside.
- Use
unknownfor untrusted input. Neverany. Noascasts before validation. - Derive types from a schema, not hand-written guards.
- Add a
nevercheck in default branches so new variants fail the build. - Brand primitives that must not mix, such as user IDs and order IDs.
FAQ
What does the ds-principles skill do?
Compact engineering principles for design, debugging, verification, and delegation, each with a trigger. Use when choosing structure or types, sizing a diff, debugging, writing tests, or when the user types /ds-principles.
How do I install ds-principles?
Run npx skills add https://github.com/aicodeking/deepseek-stack --skill ds-principles 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/ds-principles/ (personal) or .claude/skills/ds-principles/ (project).
Which AI agents can use ds-principles?
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 ds-principles 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 ds-principles?
It is published by aicodeking in aicodeking/deepseek-stack. It has 587 recorded installs.
More from aicodeking/deepseek-stack
ds-verify-loop
aicodeking/deepseek-stack
Run edit, real check, read the actual error, fix the root cause, rerun, until the check passes or the cap is hit. Use when you change code that has tests, a type checker, a build, or a runnable app, or before you claim any fix works. Invoke as /ds-verify-loop.
ds-plan-loop
aicodeking/deepseek-stack
Write a numbered plan with an acceptance check for each step, critique it once in a fresh pass, revise it, then execute one step at a time. Use when a task touches more than one file, has unclear scope, or failed before because steps were missed. Invoke as /ds-plan-loop.
ds-mode
aicodeking/deepseek-stack
Always-on working style for DeepSeek agents: restate the task, read before editing, small verified steps, evidence before done, lean context, short reports. Use when starting any coding task, when the user types /ds-mode, or when work starts to drift.
ds-unstick
aicodeking/deepseek-stack
Break out of a repeating failure: name the assumption behind all the failed fixes, test it directly, list three other approaches, pick one, and restart clean if needed. Use when the same error or wrong behavior comes back after two fix attempts, or when you notice you are retrying small variations. Invoke as /ds-unstick.
ds-context-reset
aicodeking/deepseek-stack
Keep a PROGRESS.md for long tasks and move to a fresh session or subagent that reads only that file when the context gets long or stale. Use when a task spans many steps or sessions, when the model starts repeating itself, forgets earlier facts, or re-tries old fixes, or when the context window is past about half full. Invoke as /ds-context-reset.
ds-blast-radius
aicodeking/deepseek-stack
Find what a change could break outside its own diff, then prove the key safety fact by running real code. Use before shipping a risky or untrusted change, for 'what could this break', 'blast radius of X', or /ds-blast-radius.
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.