semantic-commenting

Generate semantic code comments with Index blocks and wikilink anchors.

3|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/joshka0/foxctl --skill semantic-commenting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semantic-commenting
Source: https://github.com/joshka0/foxctl/tree/main/configs/skills-pack/semantic-commenting
Command: npx skills add https://github.com/joshka0/foxctl --skill semantic-commenting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write semantic code comments that future agents can reliably retrieve and use to understand, navigate, and validate important behavior in a codebase.

Core Features & Use Cases

  • Semantic comment lanes: create broad discoverability with structured Index blocks and create durable, evidence-only contracts with [[...]] semantic anchors.
  • Typed, evidence-focused contracts: capture invariants, risks, protocols, domains, decisions, doc and test proof points using consistent wikilink anchor syntax.
  • Better navigation and review signals: ensure anchors are placed near the true owner, use stable lowercase slugs, and keep Index blocks for navigation rather than authority.

Quick Start

Use semantic-commenting to add Index metadata and high-value [[type:slug]] anchors near the code boundary that enforces a specific protocol or safety invariant, then validate anchor parsing with the project-native tests.

Frequently Asked Questions about semantic-commenting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add semantic comments to code for retrieval by future agents?

Semantic comments provide reliable retrieval hints and typed evidence for future agents by generating structured Index blocks for navigation and durable [[type:slug]] wikilink anchors that capture invariants and protocols near the enforcing code boundary.

What is the best way to document code invariants for automated retrieval?

Document code invariants using typed semantic anchors with strict wikilink syntax, placing evidence-only contracts near the true owner of the behavior to ensure future agents retrieve durable behavioral facts rather than navigation noise.

How do semantic anchors prevent misuse as instruction or policy authority?

Semantic anchors prevent misuse by enforcing strict placement rules that keep Index blocks restricted to high-signal navigation, ensuring typed evidence anchors capture protocols and invariants without acting as instruction or policy authority.

Can I use structured Index blocks for code navigation and review?

Structured Index blocks provide broad discoverability for code navigation and review signals by mapping repo-relative doc and test targets, ensuring agents locate high-value boundaries without treating the index as an authority source.

Do I need structured Index blocks to add semantic comments to my codebase?

Adding semantic comments requires structured Index blocks for broad discoverability and strict wikilink anchor syntax for typed evidence, ensuring anchors use stable lowercase slugs and repo-relative targets to validate parsing with project-native tests.

What are the limitations of using semantic comments for codebase navigation?

Semantic comments are limited by strict anchor placement rules, requiring evidence anchors near the true owner and preventing their misuse as policy authority, meaning they cannot replace formal documentation or enforce runtime behavioral contracts.