Using the workspace

Memory and skills

How Dus remembers your preferences and project facts across sessions in plain Markdown, and how to write reusable SKILL.md skills for your project or for yourself.

Memory

Dus remembers things across sessions: preferences you state ("always use pnpm", "British English in UI text") and facts about the project that aren't obvious from the code. Memory is plain Markdown that you can read, edit or delete.

Scope Folder Used for
User ~/.duscode/memory/ Your preferences, in every project
Project <project>/.duscode/memory/ Facts about one project, shared by all its sessions

Each memory is one file with a short header (name, description) and the fact itself. A MEMORY.md index in each folder lists them. Dus manages memory with three tools:

  • remember saves a fact when you state a lasting preference or Dus learns something non-obvious.
  • forget removes one.
  • recall reads one, or lists them all.

Only the index goes into Dus's instructions. It's loaded when a session starts, so something saved now is seen from the next session on.

Asking Dus

  • "Remember that we deploy from the release branch." Dus saves it.
  • "What do you remember about this project?" Dus lists the project's memories.
  • "Forget the note about Node 18." Dus removes it.

Safety

  • Secrets are refused. Anything that looks like an API key, token, password, private key or a URL with a password in it isn't saved.
  • Project memory stays inside the project folder.
  • Memory files are yours. Edit them in any editor, or delete them.

To turn memory off, set "memory": false in your configuration.

Skills

A skill is a ready-made workflow: the steps Dus follows for a kind of task, such as a security review, fixing failing tests or setting up CI. There are two ways to use one:

  • Pick it yourself. Click + → Use a skill, or type / in the message box. The skill shows as a chip on your message, and Dus follows its instructions for that request. See Skills and slash commands.
  • Let Dus choose. Dus sees the name and description of every skill and loads one with use_skill when a task calls for it. Skills cost nothing until they're used.

The skill picker

  1. Click + at the bottom left of the message box.
  2. Choose Use a skill.
  3. Click the skill you want.

The skill shows as a chip above your message (Skill: Security review). Add your own words if you like, then send. To narrow the list first, type in Search skills; / at the start of the message box lists the same skills (Skills and slash commands).

The picker has three sections:

  • Your skills: Create a skill first, then the skills you wrote. Each has a ⋯ menu with Edit and Delete.
  • For you: three to five skills that fit the project right now. Fix failing tests when the last check failed, Review my changes when there are uncommitted changes, Write tests when there are no tests, Accessibility audit for a web app.
  • All skills: everything, A to Z.

Each skill shows its name, a one-line description and the specialist it makes Dus act as (for example Security reviewer or DevOps). Skills marked Read-only run in Plan mode, whatever mode you chose, and your mode comes back afterwards.

Built-in skills

Skill Specialist What Dus does
Fix failing tests Test engineer Runs the suite, finds why tests fail, fixes the cause (never the assertion)
Fix a bug from an error Debugger Reproduces an error or stack trace, fixes the root cause, adds a regression test
Review my changes Reviewer Reviews uncommitted or branch changes by severity
Security review Security reviewer OWASP Top 10, secrets, auth and input handling, by severity
Write tests Test engineer Tests in the project's own framework and style
Improve test coverage Test engineer Measures coverage and tests the riskiest untested code
Explain this codebase Architect A guided tour: structure, one flow end to end, where to start (read-only)
Plan a feature Architect A step-by-step plan with files, risks and tests (read-only, Plan mode)
Refactor safely Architect Small steps with tests green after each; behaviour unchanged
Speed up a slow page or endpoint Performance Measures first, fixes the bottleneck, proves it with numbers
Accessibility audit Frontend WCAG 2.2 AA: labels, keyboard, focus, contrast, headings
Upgrade dependencies safely DevOps Small batches, changelogs read, checks green
Add an API endpoint Backend REST or GraphQL the project's way: validation, auth, errors, tests, docs
Add a database migration Backend Safe, reversible migrations with the project's tool
Build a UI from a design Frontend From an attached screenshot or design, checked in the browser
Responsive and dark-mode check Frontend Every page at phone, tablet and desktop widths, light and dark
SEO and meta tags Frontend Titles, descriptions, Open Graph, canonical URLs, sitemap, robots.txt
Write or improve the docs Docs A README that gets someone from clone to running
Release notes Docs Notes from the git log and the journal since the last release
Set up CI DevOps Install, typecheck, lint, test and build on every push
Dockerize the app DevOps A small multi-stage Dockerfile, .dockerignore and compose file
Set up a self-hosted runner CI engineer Runs your GitHub Actions on your own server or this computer: installs, registers and verifies a runner (CI runners)
Check my runners CI engineer Status, queue time, disk, memory and caches of your runners, with fixes you approve
Prepare a pull request Reviewer Self-review, every check, tidy commits, a clear description
Deploy DevOps Puts the app online on your server or a hosting provider, verified live, with rollback

Creating a skill

Click + → Use a skill → Create a skill, then give it a name, a one-line description and the instructions in your own words: what to look at, the steps, and what "done" means. Tick Use it in all my projects to save it for every project; otherwise it belongs to this project. It appears under Your skills straight away, in the picker and with /. Edit or delete it from its ⋯ menu.

Skill files

Skills are plain files you can also write by hand:

Location Scope
<project>/.duscode/skills/<name>/SKILL.md This project. It can be committed and shared with your team.
~/.duscode/skills/<name>/SKILL.md All your projects

A project skill overrides a user skill with the same name, and both override a built-in.

markdown
---
name: add-endpoint
title: Add an endpoint our way
description: Add a REST endpoint to the API with validation, a service method and tests.
when_to_use: The user asks for a new API route or endpoint.
category: build
specialist: Backend
---

1. Add the route in `src/routes/<area>.ts` …
2. Validate input with the shared `schema` helpers …
3. Add a test in `test/routes/<area>.test.ts` …
  • name: lowercase letters, digits and hyphens. It defaults to the folder name.
  • description (required) and when_to_use: up to 300 characters each. Write them so Dus can tell when the skill applies.
  • title (optional): the name shown in the picker. It defaults to the name in words.
  • category (optional): build, fix, test, review, understand, improve, docs, ship or custom. It sets the icon.
  • specialist (optional): a short label such as Backend.
  • read_only: true (optional): the skill runs in Plan mode.
  • allowed_tools (optional): shown to Dus as guidance. It isn't enforced yet.

A skill's folder can also hold supporting files, such as templates or examples. Dus can list and read them when it uses the skill.

Coming soon

Listing, editing and deleting memories from the workspace. Until then, they're plain files in the folders above. See Coming soon.

Standing instructions

When you tell Dus how to work from now on, it keeps it. Examples:

  • "From now on, use pnpm in this repo."
  • "I prefer short replies with the answer first."
  • "If there's something you need fixed in Duscode, let me know."

What happens:

  • Dus saves the instruction as a memory and says so in one line, "I'll remember: …", with Undo.
  • An instruction about you, how Dus talks to you, or Duscode itself applies in every project. One about this codebase applies here only.
  • Each instruction keeps the message it came from and the date.
  • Dus applies your instructions at the start of every task, in every session.
  • Saying the same thing again refreshes it rather than adding a copy.
  • If it isn't clear you meant it for good ("for now", "in this file"), Dus asks you once instead of saving it.

What doesn't count:

  • One-off requests ("let me know when you're done").
  • Words from other sessions or from web pages. Only your own messages are read for this.

You see, edit and forget them at the top of Memory & skills, under Memory.

Lessons

Lessons are habits that reviews found in Dus's own work, kept as one-line rules for this project. For example:

  • "Temporary files go in .duscode/tmp, never /tmp."
  • "Use placeholder decision numbers."

When a lead run's reviewer finds a problem that comes from a habit rather than a one-off slip, the habit is added. If it is already there, its count goes up instead. At most 30 are kept; the least-seen go first. Dus reads the most frequent at the start of every task, and helpers read them too.

You see and edit them at the top of Memory & skills in the sidebar: Edit opens the list, one lesson per line. They are stored in <project>/.duscode/lessons.md, which you can also edit in any editor. Anything that looks like a secret is never kept.

Skills from other tools

Skills and instructions you wrote for other coding tools can come over with Bring your setup: you read each one first, and nothing you have is overwritten.

Something missing or wrong? Email support@duscode.com.