Agent skill

Code Example Patterns

by revfactory in revfactory/harness-100

기술 문서용 코드 예제 패턴 라이브러리. An agent skill from revfactory/harness-100.

Apache-2.0Auto-check passed

Install Code Example Patterns

skills CLI
$ npx skills add revfactory/harness-100 --skill code-example-patterns -a claude-code

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

GitHub CLI
$ gh skill install revfactory/harness-100 code-example-patterns --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/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ko/81-technical-writer/.claude/skills/code-example-patterns .claude/skills/code-example-patterns && 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
code-example-patterns
GitHub stars
1.3k
Token cost
~495 tokens
SKILL.md length
189 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

기술 문서용 코드 예제 패턴 라이브러리. An agent skill from revfactory/harness-100.

  • SKILL.md covers 5단계 예제 구조, 좋은 예제 vs 나쁜 예제, 언어별 스타일 가이드 and 튜토리얼 코드 구성 패턴, plus 3 more sections
  • Needs API_KEY

What it does

Code Example Patterns is an agent skill from revfactory/harness-100. 기술 문서용 코드 예제 패턴 라이브러리. doc-writer 에이전트가 코드 예제, 튜토리얼을 작성할 때 참조. '코드 예제 패턴', '튜토리얼 코드 작성' 요청 시 사용. 단, 실제 코드 컴파일이나 테스트 실행은 범위 밖.

Its SKILL.md is about 500 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is Apache-2.0.

Example prompts

  • “/code-example-patterns”

Requirements

  • Python 3
  • A credential in API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and markdown).

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

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

Context cost

Code Example Patterns loads about 495 tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 189 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 189 words, ~495 tokens.

Download SKILL.mdSave it as .claude/skills/code-example-patterns/SKILL.md (or your agent's skills folder).
name
code-example-patterns
description
기술 문서용 코드 예제 패턴 라이브러리. doc-writer 에이전트가 코드 예제, 튜토리얼을 작성할 때 참조. '코드 예제 패턴', '튜토리얼 코드 작성' 요청 시 사용. 단, 실제 코드 컴파일이나 테스트 실행은 범위 밖.

Code Example Patterns — 코드 예제 패턴 라이브러리

doc-writer 에이전트가 기술 문서에 포함할 코드 예제의 품질을 높이는 패턴.

5단계 예제 구조

1. 목표 선언 — "이 코드는 X를 수행합니다"
2. 사전 조건 — 라이브러리, 환경 변수, 설정
3. 핵심 코드 — 최소 작동 예제
4. 실행 결과 — 예상 출력
5. 확장 포인트 — "다음 단계로 Y를 할 수 있습니다"

좋은 예제 vs 나쁜 예제

나쁜 예제 (컨텍스트 없음):

python
result = client.process(data)

좋은 예제 (자기완결적):

python
# pip install example-sdk
from example_sdk import Client

client = Client(api_key="your-api-key")
data = {"name": "테스트", "value": 42}
result = client.process(data)
print(result.status)  # "success"

언어별 스타일 가이드

Python
  • 임포트 순서: 표준 → 서드파티 → 로컬
  • 타입 힌트 포함 (3.10+)
  • docstring: Google 스타일 (Args, Returns, Raises)
  • f-string 사용, format() 지양
TypeScript
  • ESM import 사용 (require 지양)
  • async/await 사용 (Promise 체이닝 지양)
  • 인터페이스/타입 명시
  • try/catch로 에러 처리
cURL
  • 줄바꿈()으로 가독성 확보
  • 환경변수로 민감 정보 분리
  • 예상 응답을 주석으로 포함

튜토리얼 코드 구성 패턴

패턴 1: 점진적 구축 (Progressive Build)
Step 1: 최소 동작 코드
Step 2: 입력 처리 추가
Step 3: 에러 처리 추가
Step 4: 설정 외부화
Step 5: 프로덕션 코드

각 단계에서 변경 부분만 강조, 기존 코드는 ...으로 축약.

패턴 2: 문제-해결 쌍
markdown
#### 문제: [구체적 문제 설명]
#### 해결: [코드와 함께 해결 방법]
패턴 3: 비교 테이블
방식장점단점코드
동기단순블로킹result = fetch()
비동기성능복잡result = await fetch()

코드 주석 규칙

규칙설명
WHY 주석"왜" 이렇게 작성했는지
WHAT 금지"무엇"은 코드 자체로
한글 주석한국어 문서에서 한글
TODO 금지예제에 미완성 금지
하드코딩 설명"실제 환경에서는..." 주석

민감 정보 처리

python
# 올바름: 환경변수
api_key = os.environ["API_KEY"]

# 문서용 플레이스홀더
api_key = "your-api-key-here"  # 실제 키로 교체

품질 체크리스트

항목기준
자기완결성import~실행까지 복사-붙여넣기 동작
에러 처리try/catch 포함
타입 정보변수/파라미터/반환값 타입 명시
실행 결과예상 출력 포함
민감 정보하드코딩 시크릿 없음
버전 명시언어/라이브러리 버전

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in ko/81-technical-writer/.claude/skills/code-example-patterns of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Code Example Patterns 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.

Code Example Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Example Patterns this skillrevfactory/harness-1001.3k—~495Automated safety check: PassApache-2.0
Doc Writergo-spring/go-spring1.8k—~354Automated safety check: PassApache-2.0
Doc Writerpretend1111/claude-desktop-app4941 repos~375Automated safety check: PassCustom licence
Doc Writermoq/Moq.AutoMocker429—~2.7kAutomated safety check: PassMIT
Doc Writermicrosoft/aspire.dev196—~7.6kAutomated safety check: PassMIT
Doc Writermitchdenny/hex1b177—~8.7kAutomated safety check: PassMIT

Similar skills

  • Doc Writer

    go-spring/go-spring

    用于编写、改写、审阅或扩展 Go-Spring 文档。写作前应核对源码、测试、示例和已有文档;当目标文档属于已约束范围时,遵守 Go-Spring 文档写作规范。

    1.8k GitHub stars~354 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Doc Writer

    pretend1111/claude-desktop-app

    Generate README, API docs, or user guides for code and projects.

    494 GitHub starsUsed in 1 repo~375 tokens
    DevelopmentAuto-check passed
  • Doc Writer

    moq/Moq.AutoMocker

    Guidelines for producing accurate and maintainable documentation for Moq.AutoMocker.

    429 GitHub stars~2.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Doc Writer

    microsoft/aspire.dev

    Official

    Guidelines for producing accurate and maintainable documentation for the Aspire documentation site.

    196 GitHub stars~7.6k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Doc Writer

    mitchdenny/hex1b

    Guidelines for producing accurate and maintainable documentation for the Hex1b TUI library.

    177 GitHub stars~8.7k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Docs Writer

    strands-agents/harness-sdk

    Draft or rewrite Strands Agents documentation pages. An agent skill from strands-agents/harness-sdk.

    8.7k GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Questions about Code Example Patterns

What does Code Example Patterns do?

기술 문서용 코드 예제 패턴 라이브러리. An agent skill from revfactory/harness-100. Code Example Patterns is an agent skill from revfactory/harness-100. 기술 문서용 코드 예제 패턴 라이브러리.

How do I install Code Example Patterns in Claude Code?

Run `npx skills add revfactory/harness-100 --skill code-example-patterns -a claude-code`. Or copy the skill folder (ko/81-technical-writer/.claude/skills/code-example-patterns in revfactory/harness-100) into .claude/skills/code-example-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Code Example Patterns in Codex?

Run `npx skills add revfactory/harness-100 --skill code-example-patterns -a codex`. Or copy the skill folder (ko/81-technical-writer/.claude/skills/code-example-patterns in revfactory/harness-100) into .agents/skills/code-example-patterns in your project. Codex loads it when a task matches its description.

Can I use Code Example Patterns 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 revfactory/harness-100 --skill code-example-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-example-patterns, .gemini/skills/code-example-patterns, .github/skills/code-example-patterns and .opencode/skills/code-example-patterns in your project.

What does Code Example Patterns need to run?

Going by SKILL.md and its folder, Code Example Patterns needs credentials named API_KEY. Our summary lists: Python 3; A credential in API_KEY.

Does Code Example Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Example Patterns 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. Review the folder before installing.

What licence does Code Example Patterns use?

Code Example Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Example Patterns use?

About 495 tokens (SKILL.md is roughly 2k 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 Code Example Patterns?

Skills that share tags, products or a category with Code Example Patterns: Doc Writer (go-spring/go-spring, 1.8k stars), Doc Writer (pretend1111/claude-desktop-app, 494 stars), Doc Writer (moq/Moq.AutoMocker, 429 stars) and Doc Writer (microsoft/aspire.dev, 196 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Example Patterns?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

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