Skip to content
Back to skills

Code Example Patterns

ASecurity

technical document code example pattern library. doc-writer agent code example, writingto do when reference. 'code example pattern', ' code writing' request when usage. However, actual code file test execution scope outside.

  • 1,256 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 29, 2026
documentationtypescriptpythongoapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned May 29, 2026

npx -y skills add revfactory/harness-100 --skill code-example-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Example Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Example Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/revfactory-code-example-patterns/badge)](https://www.skillsdirectory.com/skills/revfactory-code-example-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-example-patterns
description: "technical document code example pattern library. doc-writer agent code example, writingto do when reference. 'code example pattern', ' code writing' request when usage. However, actual code file test execution scope outside."
---

# Code Example Patterns — code example pattern library

doc-writer agent technical document includedto do code example quality pattern.

## 5stage example structure

```
1. goal — " code X perform"
2. companybefore condition — library, environment number, setting
3. core code — minimum work example
4. execution result — expected capability
5. extension point — "next stage Y to do number "
```

## example vs example

** example** ( None):
```python
result = client.process(data)
```

** example** (specialistbasisquality):
```python
# pip install example-sdk
from example_sdk import Client

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

## by style guide

### Python
- order: tablelevel → from → 
- type included (3.10+)
- docstring: Google style (Args, Returns, Raises)
- f-string usage, format degree

### TypeScript
- ESM import usage (require degree)
- async/await usage (Promise degree)
- person/type specify
- try/catch error processing

### cURL
- (\)as readability secure
- environmentnumber information minute
- expected annotationas included

## code composition pattern

### pattern 1: pointquality building (Progressive Build)
```
Step 1: minimum work code
Step 2: input processing addition
Step 3: error processing addition
Step 4: setting external
Step 5: code
```
each stagefrom **change departmentminute only **, existing code `...`as approx..

### pattern 2: problem- 
```markdown
#### problem: [specific problem description]
#### : [code and method]
```

### pattern 3: comparison 
| method | advantage | disadvantage | code |
|------|------|------|------|
| basis | | | `result = fetch` |
| basis | nature | | `result = await fetch` |

## code annotation rule

| rule | description |
|------|------|
| WHY annotation | "" writingdegree |
| WHAT prohibited | "" code specialist |
| Korean annotation | Korean documentfrom Korean |
| TODO prohibited | example un-nature prohibited |
| description | "actual environmentfrom..." annotation |

## information processing

```python
# : environmentnumber
api_key = os.environ["API_KEY"]

# document placeholder
api_key = "your-api-key-here" # actual 
```

## quality checklist

| item | standard |
|------|------|
| specialistbasisnature | import~executionto company-basis work |
| error processing | try/catch included |
| type information | number/un-/exchange type specify |
| execution result | expected capability included |
| information | when None |
| version specify | /library version |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.