Agent skill

Docs

by jjjkkkjjj in jjjkkkjjj/Matft

Procedure for writing and updating Matft's documentation (the Docusaurus site in website/ and the doc comments on the public API that become the Swift-DocC API reference).

BSD-3-ClauseAuto-check passedMobile

Install Docs

skills CLI
$ npx skills add jjjkkkjjj/Matft --skill docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jjjkkkjjj/Matft docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jjjkkkjjj/Matft.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/docs .claude/skills/docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docs
GitHub stars
147
Token cost
~2.7k tokens
SKILL.md length
1,049 words
Files
3 (incl. scripts)
Skills in repo
5
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Procedure for writing and updating Matft's documentation (the Docusaurus site in website/ and the doc comments on the public API that become the Swift-DocC API reference).

  • Works in 6 steps: Decide what to update → Doc comments (API reference) → Site (website/) → …
  • Keep docs in sync when adding
  • SKILL.md covers 1. Decide what to update, 2. Doc comments (API reference), 3. Site (website/) and 4. Verify code example output, plus 2 more sections
  • Runs Python scripts from its folder; calls swift, npm and python3

What it does

Docs is an agent skill from jjjkkkjjj/Matft. Procedure for writing and updating Matft's documentation (the Docusaurus site in website/ and the doc comments on the public API that become the Swift-DocC API reference). Use it to keep docs in sync when adding or changing functions or types, to add or fix guide pages and the NumPy mapping tables, to rewrite /// or / / comments, to fix DocC warnings, and to check that the site builds. Use this skill whenever the conversation is about Matft's documentation or comments — e.g. "write docs", "update the docs", "fix…

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `evals/evals.json` and `scripts/undocumented_symbols.py`).

It sits in Mobile, covering iOS development. It works with NumPy. The repository describes itself as: Numpy-like library in swift. (Multi-dimensional Array, ndarray, matrix and vector library). The licence is BSD-3-Clause.

When your agent uses it

  • Keep docs in sync when adding
  • Changing functions
  • Fix guide pages and the NumPy mapping tables
  • Fix DocC warnings

Example prompts

  • “s documentation or comments — e.g.”
  • “update the docs”
  • “fix the API comments”
  • “/docs”

Requirements

  • Python 3
  • Node.js

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Decide what to update
  2. Doc comments (API reference)
  3. Site (website/)
  4. Verify code example output
  5. Build and check
  6. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 618dcfc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • swift
    • npm
    • python3
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • jjjkkkjjj.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Docs loads about 2.7k tokens when it runs. Until then it costs about 219 tokens; SKILL.md has 1,049 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~219
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jjjkkkjjj/Matft at commit 618dcfc, republished under its BSD-3-Clause licence (© jjjkkkjjj). 1,049 words, ~2,718 tokens.

Download SKILL.mdSave it as .claude/skills/docs/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
docs
description
Procedure for writing and updating Matft's documentation (the Docusaurus site in website/ and the doc comments on the public API that become the Swift-DocC API reference). Use it to keep docs in sync when adding or changing functions or types, to add or fix guide pages and the NumPy mapping tables, to rewrite /// or /** */ comments, to fix DocC warnings, and to check that the site builds. Use this skill whenever the conversation is about Matft's documentation or comments — e.g. "write docs", "update the docs", "fix the API comments", "add it to the NumPy mapping table", "add a guide page", "get rid of the DocC warnings", "reflect it on the site", or in Japanese「ドキュメント書いて」「docs 更新して」「API コメント直して」「NumPy 対応表に追加して」「ガイドにページ追加」「DocC の警告消して」「サイトに反映して」— even if the word "skill" is never mentioned. Also use it when updating docs in a PR that implements a new feature.

Writing Matft documentation

Matft's documentation has two layers.

LayerLocationRole
Site (Docusaurus)website/docs/Prose: guides, NumPy mapping tables, performance, contributing
API reference (Swift-DocC)Doc comments in Sources/Matft/**/*.swift + Sources/Matft/Matft.docc/Matft.mdSpec of every public symbol

Both are built by .github/workflows/docs.yml and published to GitHub Pages (https://jjjkkkjjj.github.io/Matft/, API at /Matft/api/documentation/matft). CI treats DocC warnings as errors and broken site links as errors, so pass the same checks locally before opening a PR.

The README is only an entry point (overview, examples, installation, links). Do not add details to the README; write them on the site and link to them.

1. Decide what to update

Where each kind of change needs to be reflected. The NumPy mapping tables and the Topics in Matft.md are the ones most often missed.

ChangeUpdate
Public function/method added or signature changedThat symbol's doc comment (2.), one row in the table in website/docs/numpy-mapping/<category>.md
Behavior changed (types, return value, difference from Numpy)The comment, code examples and output on the relevant guide page, Method / Complex columns of the mapping table
Public type (enum / struct / class) addedComments (the type and every case), the right group under ## Topics in Sources/Matft/Matft.docc/Matft.md
Headline feature addedA guide page or section (3.); if needed, the Features in website/docs/intro.md and one Features line in the README
Image processing case addedCreate comparison images with the image-visual-check skill and put them in website/docs/guide/image.md
Benchmark tableThe benchmark skill (--update-docs). Never edit by hand

2. Doc comments (API reference)

Read the implementation before writing

Comments describe how the implementation actually behaves. Guessing from the signature or old comments publishes a false spec on DocC. In particular, check these in the implementation:

  • Supported types, and the mftype of the result (e.g. integer input becomes Float)
  • Whether complex is supported: if it calls unsupport_complex(...), it is not → write it in - Precondition:
  • The meaning of defaults such as axis / keepDims, and the behavior when axis is omitted
  • Whether the return value is a view (shares memory with the original) or a copy
  • If it throws, which MfError cases it throws (only cases actually thrown)
  • Differences from Numpy (scipy / cv2 / PIL / librosa)

When the implementation and the comment disagree and you cannot tell which is intended (i.e. a suspected bug), do not fix the code: make the comment match the actual behavior and report the suspicion to the user. The fix goes in a separate PR following the TDD rule in CLAUDE.md. Fixing code on the side during documentation work sneaks in untested behavior changes.

Format

Match the existing format of each file (/** ... */ or ///). Do not mix them.

swift
/**
   Return the indices of the elements that are non-zero.

   Equivalent to `numpy.nonzero`. NaN counts as non-zero. The indices are listed in row-major order.

   - Parameters:
        - mfarray: The input array.
   - Returns: One 1-d `.Int` array per dimension of `mfarray`, holding the indices of the non-zero elements along that dimension.
   - Precondition: Complex arrays are not supported.
*/
public static func nonzero(_ mfarray: MfArray) -> [MfArray]{
  • First line: a one-sentence summary (shown in DocC listings). Details after a blank line.
  • If there is a counterpart, write Equivalent to \numpy.xxx`.` (likewise for cv2 / PIL / transformers / librosa / scipy).
  • List every argument under - Parameters: (capital P). Names must match the internal names in the signature (a mismatch causes a DocC warning → CI failure). Do not write meaningless descriptions like mfarray: mfarray.
  • - Returns: / - Throws: / - Precondition: / - Note: (differences from Numpy and caveats).
  • For method versions, write Method version of \Matft.transpose(_:axes:)`.` and repeat only the key points.
  • For operators, write the Numpy counterpart (*& is @, === is element-wise ==, == is numpy.array_equal).
  • For internal helpers that happen to be public, write - Note: This is an implementation detail of Matft and may change. Do not change the access level.
  • Document protocol requirements on the requirement. No need to document each conforming implementation for Int / Float etc. (DocC inherits the requirement's description).
  • Use ``Symbol`` double-backquote links only when you are sure they resolve. Unresolved links become warnings, so normally write code.
  • Write in English.
Code examples

Add short ```swift examples only to major entry points (creation functions, commonly used operations, image/audio preprocessing, etc.). If you include output, copy values straight from a test or use only results actually run as in 4. Never guess output.

Show full SKILL.md (413 more words)Show less

3. Site (website/)

Structure
website/
  docs/intro.md, performance.md, contributing.md
  docs/getting-started/   installation, quick-start
  docs/guide/             mfarray, indexing, views, manipulation, arithmetic, math-and-stats, linalg, complex, image, audio, mlx
  docs/numpy-mapping/     index (legend) + mapping tables by category
  sidebars.ts             ← always register new pages here (docsSidebar / mappingSidebar)
  docusaurus.config.ts    navbar, footer, baseUrl=/Matft/
  src/pages/index.tsx     top page (Numpy vs Matft code comparison and feature cards)
  scripts/copy-assets.mjs Tests/MatftTests/files/images/compare → static/img/compare (copied at build time, not tracked by git)
Rules
  • .md is parsed as CommonMark (markdown.format: 'detect'). JSX / MDX syntax is not available (use .mdx for that). In exchange, <, { in tables and HTML comments (the BENCHMARK markers) can be written as-is.
  • Use admonitions for notes: :::note / :::caution / :::warning / :::info Beta … :::.
  • Link to other pages with relative .md paths (e.g. ../numpy-mapping/math.md, ./views.md#copy). Use file paths rather than URLs so broken links are detected at build time.
  • Comparison images: ![alt](/img/compare/<case>.png). Do not copy images into website and commit them.
  • Link to the API reference with pathname:///api/documentation/matft (no trailing slash, because of trailingSlash: false).
  • Give new pages a title: in the front matter and add them to sidebars.ts.
NumPy mapping tables

The tables in website/docs/numpy-mapping/*.md have these four columns.

markdown
| Matft | Numpy | Method | Complex |
| --- | --- | :---: | :---: |
| `Matft.stats.median` | `numpy.median` |  |  |
| `Matft.transpose` | `numpy.transpose` | ✓ | ✓ |
| `MfArray.toArray` | `numpy.ndarray.tolist` | only |  |
  • Method: ✓ = a method version also exists (a.transpose()), only = method version only.
  • Complex: ✓ if complex arrays are supported.
  • If the counterpart is not Numpy, write its name (cv2.GaussianBlur, librosa.stft, etc.). n/a if there is none.
  • To list a function and an operator in one cell, separate them with <br /> (e.g. `Matft.matmul`<br />`*&`).

4. Verify code example output

Output shown in guides or the Quick Start must be verified by actually running it. Print it from a temporary test and copy it.

sh
cat > Tests/MatftTests/TmpDocsSnippetTest.swift <<'EOF'
import XCTest
@testable import Matft

final class TmpDocsSnippetTest: XCTestCase {
    func testSnippets() {
        print("SNIP")
        let a = Matft.arange(start: 0, to: 6, by: 1, shape: [2, 3])
        print(a.sum(axis: 0))
    }
}
EOF
swift test --filter MatftTests.TmpDocsSnippetTest 2>&1 | sed -n '/^SNIP/,/^◇/p'
rm Tests/MatftTests/TmpDocsSnippetTest.swift   # always delete it when done (never commit it)
  • Copy tabs and spaces exactly as Matft prints them.
  • If an existing example no longer matches the current implementation (e.g. after a behavior-changing PR), fix both the example and its output.

5. Build and check

sh
DOCC_WARNINGS_AS_ERRORS=1 ./scripts/build-docs.sh               # API reference → website/static/api
python3 .claude/skills/docs/scripts/undocumented_symbols.py     # public symbols without comments (must be 0)

cd website
npm ci                  # first time only
npm run build           # fails on broken links
npx docusaurus serve --port 3210 --no-open    # for visual checks (http://localhost:3210/Matft/)
  • build-docs.sh does not use swift-docc-plugin; it feeds the symbol graph from swift build to docc convert. Do not add DocC dependencies to Package.swift (it would add dependencies for users). For the API only, use ./scripts/build-docs.sh --preview.
  • undocumented_symbols.py reads the symbol graph produced by build-docs.sh, so run build-docs.sh first.
  • DocC warnings are mostly warning: Parameter 'x' is missing documentation / not found in ... declaration. Making the comment's parameter list match the signature removes them.
  • For the visual check, open the pages you changed and the API pages of the affected symbols. serve redirects /api/documentation/matft/ because of trailingSlash: false; this is not a problem in production (GitHub Pages).

6. Report

  • Pages and files updated, rows added to the mapping tables
  • DocC warning count and undocumented symbol count (both must be 0), and the site build result
  • Code examples verified by running them
  • Suspicious behavior found while writing comments (file:line, what differs from Numpy / the comment). State explicitly that you did not fix it

Documentation-only changes are exempt from TDD. However, when changing scripts such as scripts/benchmark.py, write the tests first (scripts/test_benchmark.py).

© jjjkkkjjj, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in .claude/skills/docs of jjjkkkjjj/Matft.

  • SKILL.md
  • evals/evals.json
  • scripts/undocumented_symbols.py

Open the folder on GitHubat commit 618dcfc

Compare with similar skills

Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docs this skilljjjkkkjjj/Matft147—~2.7kAutomated safety check: PassBSD-3-Clause
Swiftui Protwostraws/SwiftUI-Agent-Skill5.2k2 repos~1.5kAutomated safety check: PassMIT
Swiftui UI PatternsAFK-surf/OpenBridge4304 repos~887Automated safety check: PassMIT
Swiftui Performance Auditharperreed/dotfiles3348 repos~1.4kAutomated safety check: PassNone
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT
Hig Components Contentraintree-technology/hig-doctor1435 repos~1.3kAutomated safety check: PassMIT

Similar skills

  • Swiftui Pro

    twostraws/SwiftUI-Agent-Skill

    Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.

    5.2k GitHub starsUsed in 2 repos~1.5k tokens
    MobileAuto-check passed
  • Swiftui UI Patterns

    AFK-surf/OpenBridge

    Best practices and example-driven guidance for building SwiftUI views and components.

    430 GitHub starsUsed in 4 repos~887 tokens
    MobileAuto-check passed
  • Swiftui Performance Audit

    harperreed/dotfiles

    Audit and improve SwiftUI runtime performance from code review and architecture.

    334 GitHub starsUsed in 8 repos~1.4k tokens
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    143 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

    143 GitHub starsUsed in 5 repos~1.3k tokens
    MobileAuto-check passed
  • macOS Auto Update

    fayazara/macos-app-skills

    Add Sparkle auto-update support to a native macOS app. An agent skill from fayazara/macos-app-skills.

    676 GitHub stars~1.8k tokensUpdated 4 mo ago
    MobileAuto-check passed

More from jjjkkkjjj/Matft

  • Test Design

    jjjkkkjjj/Matft

    Procedure for designing and writing Matft's XCTest cases with high coverage — boundary values, dtypes, memory layouts, NaN/inf, empty arrays, broadcasting, platform differences, performance and…

    147 GitHub stars~2k tokensUpdated 12 days ago
    Auto-check passed
  • Benchmark

    jjjkkkjjj/Matft

    Procedure for benchmarking Matft's PerformanceTests against Numpy and reporting the results (and, when asked, updating the speed comparison table on the docs site, website/docs/performance.md).

    147 GitHub stars~1.7k tokensUpdated 12 days ago
    Auto-check passed
  • Image Visual Check

    jjjkkkjjj/Matft

    Procedure for adding tests for Matft's image processing (Matft.image., indexing or channel swapping on images, etc.), generating comparison images that put the result next to an OpenCV reference…

    147 GitHub stars~2.3k tokensUpdated 12 days ago
    Auto-check passed
  • Release

    jjjkkkjjj/Matft

    Procedure for releasing a new version of Matft (decide the version → check tests → write release notes → create and push an annotated tag → publish a GitHub Release).

    147 GitHub stars~1.8k tokensUpdated 12 days ago
    Auto-check passed

Works with

Categories

Questions about Docs

What does Docs do?

Procedure for writing and updating Matft's documentation (the Docusaurus site in website/ and the doc comments on the public API that become the Swift-DocC API reference). Docs is an agent skill from jjjkkkjjj/Matft. Procedure for writing and updating Matft's documentation (the Docusaurus site in website/ and the doc comments on the public API that become the Swift-DocC API reference).

When should I use Docs?

Docs fits situations like: keep docs in sync when adding; changing functions; fix guide pages and the NumPy mapping tables; fix DocC warnings.

How do I install Docs in Claude Code?

Run `npx skills add jjjkkkjjj/Matft --skill docs -a claude-code`. Or copy the skill folder (.claude/skills/docs in jjjkkkjjj/Matft) into .claude/skills/docs in your project. Claude Code loads it when a task matches its description.

How do I install Docs in Codex?

Run `npx skills add jjjkkkjjj/Matft --skill docs -a codex`. Or copy the skill folder (.claude/skills/docs in jjjkkkjjj/Matft) into .agents/skills/docs in your project. Codex loads it when a task matches its description.

Can I use Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jjjkkkjjj/Matft --skill docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docs, .gemini/skills/docs, .github/skills/docs and .opencode/skills/docs in your project.

What does Docs need to run?

Going by SKILL.md and its folder, Docs needs Python for the scripts in its folder and the command-line tools its instructions call (swift, npm, python3 and npx). Our summary lists: Python 3; Node.js.

Does Docs access the network?

SKILL.md names 1 domain. As links in the text: jjjkkkjjj.github.io. This is read from the text; nothing was executed.

Is Docs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Docs use?

Docs is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docs use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Docs?

Skills that share tags, products or a category with Docs: Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5.2k stars), Swiftui UI Patterns (AFK-surf/OpenBridge, 430 stars), Swiftui Performance Audit (harperreed/dotfiles, 334 stars) and Hig Project Context (raintree-technology/hig-doctor, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docs?

jjjkkkjjj (a GitHub user) maintains it in jjjkkkjjj/Matft, which has 147 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 27, 2026.

Source: jjjkkkjjj/Matft on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.