ccn:create-topic
Create a new topic file in .notes/ with frontmatter template
Best use case
ccn:create-topic is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create a new topic file in .notes/ with frontmatter template
Teams using ccn:create-topic should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ccn-create-topic/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ccn:create-topic Compares
| Feature / Agent | ccn:create-topic | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create a new topic file in .notes/ with frontmatter template
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Create Topic Skill
This skill creates a new topic file in the `.notes/` directory with structured frontmatter and section headers.
## Instructions for Claude
When this command is invoked with `/ccn:create-topic $ARGUMENTS`:
### Step 1: Validate argument
If `$ARGUMENTS` is empty or not provided:
- Show error: "Error: Topic name required"
- Show usage: "Usage: /ccn:create-topic <topic-name>"
- STOP - do not continue
### Step 2: Normalize topic name to filename
Take the provided topic name and transform it:
1. Replace all spaces with underscores
2. Replace all hyphens with underscores
3. Convert to UPPERCASE
4. Add `.md` extension
Examples:
- "api-design" → "API_DESIGN.md"
- "my topic" → "MY_TOPIC.md"
- "error_handling" → "ERROR_HANDLING.md"
Store the result as the filename.
### Step 3: Check if file exists
Use the **Read** tool to check if `.notes/{filename}` already exists.
- If the file EXISTS:
- Tell user: "Error: Topic already exists: .notes/{filename}"
- Tell user: "Use /ccn:update-topic to add entries to this topic"
- STOP - do not continue
- If the file DOES NOT exist:
- Continue to next step
### Step 4: Create .notes/ directory if needed
Use the **Bash** tool to ensure the directory exists:
```bash
mkdir -p .notes
```
### Step 5: Generate frontmatter
Create YAML frontmatter with these fields:
1. **description**: "Knowledge and patterns for {original topic name}"
- Use the original input, not the normalized filename
- Example: input "api-design" → "Knowledge and patterns for api-design"
2. **keywords**: Generate array from normalized filename
- Split filename (without .md) on underscores
- Lowercase each part
- Include the combined form (full filename without .md, lowercased)
- Example: "API_DESIGN.md" → `["api", "design", "api_design"]`
3. **last_updated**: Today's date in YYYY-MM-DD format
### Step 6: Create file with template
Use the **Write** tool to create `.notes/{filename}` with this structure:
```markdown
---
description: "Knowledge and patterns for {topic}"
keywords: [{keyword array}]
last_updated: "YYYY-MM-DD"
---
# {Topic Name}
## Overview
(Add overview content here)
## Key Concepts
(Document key concepts here)
## Patterns
(Capture recurring patterns here)
## Notes
(Add detailed notes here)
---
*Topic created: YYYY-MM-DD*
```
**Important formatting notes:**
- Use the original topic name (not normalized) for the H1 heading
- Use proper YAML array syntax for keywords
- Include the footer timestamp at the bottom
### Step 7: Confirm completion
Tell the user: "Created: .notes/{filename}"
## Error Handling
If any tool fails (mkdir, Read, Write):
- Show the error message
- Explain what went wrong
- Do NOT create partial filesRelated Skills
acc-create-test-builder
Generates Test Data Builder and Object Mother patterns for PHP 8.5. Creates fluent builders with sensible defaults and factory methods for test data creation.
acc-create-query
Generates CQRS Queries and Handlers for PHP 8.5. Creates read-only query DTOs with handlers that return data without side effects. Includes unit tests.
acc-create-psr18-http-client
Generates PSR-18 HTTP Client implementation for PHP 8.5. Creates ClientInterface with request sending and exception handling. Includes unit tests.
acc-create-psr14-event-dispatcher
Generates PSR-14 Event Dispatcher implementation for PHP 8.5. Creates EventDispatcherInterface, ListenerProviderInterface, and StoppableEventInterface with event propagation. Includes unit tests.
acc-create-entity
Generates DDD Entities for PHP 8.5. Creates identity-based objects with behavior, state transitions, and invariant protection. Includes unit tests.
acc-create-builder
Generates Builder pattern for PHP 8.5. Creates step-by-step object construction with fluent interface and validation. Includes unit tests.
acc-create-value-object
Generates DDD Value Objects for PHP 8.5. Creates immutable, self-validating objects with equality comparison. Includes unit tests.
acc-create-unit-test
Generates PHPUnit unit tests for PHP 8.5. Creates isolated tests with AAA pattern, proper naming, attributes, and one behavior per test. Supports Value Objects, Entities, Services.
acc-create-test-double
Generates test doubles (Mocks, Stubs, Fakes, Spies) for PHP 8.5. Creates appropriate double type based on testing needs with PHPUnit MockBuilder patterns.
acc-create-psr7-http-message
Generates PSR-7 HTTP Message implementations for PHP 8.5. Creates Request, Response, Stream, Uri, and ServerRequest classes with immutability. Includes unit tests.
acc-create-policy
Generates Policy pattern for PHP 8.5. Creates encapsulated business rules for authorization, validation, and domain constraints. Includes unit tests.
acc-create-null-object
Generates Null Object pattern for PHP 8.5. Creates safe default implementations eliminating null checks. Includes unit tests.