Markdown Converter
Agent skill for markdown-converter
Before working on a task, we will agree a plan. Follow this plan closely. If the agreed approach turns out to be impossible or significantly more complex than expected, **STOP and summarise the problems**. In particular, don't install packages, make changes to build files, project setup, or code out
Sign in to like and favorite skills
Before working on a task, we will agree a plan. Follow this plan closely. If the agreed approach turns out to be impossible or significantly more complex than expected, STOP and summarise the problems. In particular, don't install packages, make changes to build files, project setup, or code outside the scope of what you're working on.
bun check. Only fix issues that are related to the code you're working on. If there are unrelated lint or test issues elsewhere in the codebase report them but no not fix them.git checkout . In the past it has led to significant loss of work where all changes are lost, when you only intended a more minor reset. Instead, if believe you need to use a checkout operation, stop and report the issue to the user to decide what to do and ensure that no work is lost.bun check:test (extra params can be added directly, e.g. bun check:test file-pattern -t TestNamePattern)bun check:tsbun check:lintbun format - IMPORTANT: always run checks (bun check) THEN format (bun format) after completing functionality changesdocker compose down && docker compose up -dThese guidelines must be followed when writing code for the Aku project. After implementing any feature, review all code against these guidelines.
describe() blocks: When testing a particular function or class, pass the function/class reference directly as the first argument, NOT a string.
describe(myFunc, () => { ... })describe(MyClass, () => { ... })describe("myFunc", () => { ... })describe("MyClass", () => { ... })Async expectations: In bun, expect never returns a promise
expect(foo).toBe(bar)await expect(foo).toBe(bar)Type assertions: Use
toEqualTypeOf not the deprecated toMatchTypeOf
expectTypeOf(value).toEqualTypeOf<Expected>()expectTypeOf(value).toMatchTypeOf<Expected>()Mocking: Do not explicitly call mockRestore() after tests that use mocking, as we do that in common test setup anyway
Avoid
type: Use any
unknown where possible. When type casting is necessary:
foo = bar as TheCorrectTypefoo = bar as anyPrivate methods: Use true private fields with
# prefix
#privateMethod() { ... }private privateMethod() { ... }Optional parameters and properties: Due to
--isolatedDeclarations:
undefined in their type
function foo(opt?: string) { ... }function foo(opt?: string | undefined) { ... }undefined in their type
{ optional?: string | undefined }{ optional?: string }Use static imports at the top of the file
import fs from "node:fs/promises";await import("node:fs/promises") -- dynamic imports are not allowedconst promises = require("node:fs/promises") -- require is not allowed, either at the top of files or in codefunction processPath(path: string): import("node:path").ParsedPath -- inline import in type annotationAvoid British/American ambiguity in public API: avoid exporting values and public members that are spelled differently in British and American English
export const cleanString = () => ...export const sanitiseString = () => ... OR const sanitizeString = () => ...TSDoc comments, markdown files and test names are all "documentation"
@param options.optName - Description of option - description with no square brackets around the parameter name@param options - Options to control behaviour - the options parameter itself does not need a @param@param input - Input string - stating the obvious@return the input converted to lowercase - instead, comment should start "Convert a string to lowercase"CRITICAL: Never add lint-disable comments. This includes:
// oxlint-disable// eslint-disable// biome-ignoreIf a lint rule blocks your implementation:
It is acceptable to leave unfixable lint errors. It is NOT acceptable to add disable comments.