.claude/skills/ts-code-documenter/SKILL.md
Generate comprehensive documentation for undocumented or poorly documented codebases. Use when a user asks to document code, add JSDoc/docstrings, create README files, generate architecture docs, explain what a codebase does, produce onboarding guides, or document internal APIs. Works with any language.
npx skillsauth add eliferjunior/Claude code-documenterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyzes source code to generate accurate, context-aware documentation at multiple levels: inline comments for complex logic, function/class docstrings, module-level overviews, architecture documents, and onboarding guides. Understands control flow, data transformations, side effects, and cross-module dependencies.
When asked to document code:
Determine the documentation level needed:
For function/method documentation, extract:
For complex logic, add inline comments explaining:
For architecture documentation:
Language-specific format:
@param, @returns, @throws, @example@param, @return, @throws/// doc comments with # Examples sectionsQuality rules:
foo, bar, test123Input:
def process_payment(user_id, amount, currency, idempotency_key=None):
user = db.users.find(user_id)
if not user:
raise ValueError("User not found")
if user.balance < amount and not user.credit_enabled:
return {"status": "declined", "reason": "insufficient_funds"}
charge = stripe.charges.create(
amount=int(amount * 100),
currency=currency,
customer=user.stripe_id,
idempotency_key=idempotency_key
)
db.transactions.insert({
"user_id": user_id, "amount": amount,
"stripe_charge_id": charge.id, "created_at": datetime.utcnow()
})
if user.balance < amount:
user.balance = user.balance - amount
db.users.update(user)
return {"status": "success", "charge_id": charge.id}
Output:
def process_payment(user_id, amount, currency, idempotency_key=None):
"""Process a payment by charging the user's Stripe account.
Validates the user's balance (unless credit is enabled), creates a Stripe
charge, records the transaction, and deducts from the user's internal balance
if applicable.
Args:
user_id: Internal user identifier (e.g., "usr_8f2k3j").
amount: Charge amount in major currency units (e.g., 49.99).
currency: ISO 4217 currency code (e.g., "usd", "eur").
idempotency_key: Optional key to prevent duplicate charges on retry.
Recommended for all production calls.
Returns:
dict: {"status": "success", "charge_id": "ch_..."} on success,
{"status": "declined", "reason": "insufficient_funds"} if balance
is too low and credit is not enabled.
Raises:
ValueError: If user_id does not match any user in the database.
stripe.error.CardError: If the card is declined by Stripe.
stripe.error.InvalidRequestError: If Stripe parameters are invalid.
Side Effects:
- Creates a Stripe charge (external API call)
- Inserts a row into the transactions table
- May update the user's balance
Example:
>>> result = process_payment("usr_8f2k3j", 49.99, "usd", idempotency_key="pay_retry_001")
>>> result
{"status": "success", "charge_id": "ch_3Kx9mPqR2s"}
Note:
⚠ Potential bug: balance deduction only happens when balance < amount,
but the charge always goes through. If balance >= amount, the user is
charged via Stripe but their internal balance is not deducted.
"""
Input:
Document the architecture of our notification service in src/services/notifications/
Output:
# Notification Service — Architecture
## Purpose
Delivers user notifications across email, push, and in-app channels.
Handles template rendering, delivery scheduling, preference checking,
and delivery status tracking.
## Module Map
notifications/
├── router.ts — HTTP endpoints for notification preferences and history
├── service.ts — Core orchestration: resolves channel, renders template, dispatches
├── channels/
│ ├── email.ts — SendGrid integration (SMTP fallback)
│ ├── push.ts — Firebase Cloud Messaging
│ └── in-app.ts — WebSocket broadcast + database persistence
├── templates/
│ ├── renderer.ts — Handlebars template engine with i18n support
│ └── templates/ — .hbs files organized by notification type
├── preferences.ts — User channel preferences (opt-in/opt-out per type)
└── queue.ts — Bull queue consumer for async delivery
## Key Data Flow: Sending a Notification
1. API call or internal event → service.send(userId, type, data)
2. service.ts checks user preferences → skips opted-out channels
3. renderer.ts renders template with user's locale
4. Dispatch queued via Bull (Redis-backed) for reliability
5. Channel adapter delivers and records status in notifications table
## External Dependencies
- SendGrid API (email delivery)
- Firebase Cloud Messaging (push notifications)
- Redis (Bull queue backing store)
- PostgreSQL (notification history, preferences, templates metadata)
## Environment Variables
SENDGRID_API_KEY, FCM_SERVER_KEY, REDIS_URL, NOTIFICATION_FROM_EMAIL
development
Expert guidance for Fireworks AI, the platform for running open-source LLMs (Llama, Mixtral, Qwen, etc.) with enterprise-grade speed and reliability. Helps developers integrate Fireworks' inference API, fine-tune models, and deploy custom model endpoints with function calling and structured output support.
development
Convert any website into clean, structured data with Firecrawl — API-first web scraping service. Use when someone asks to "turn a website into markdown", "scrape website for LLM", "Firecrawl", "extract website content as clean text", "crawl and convert to structured data", or "scrape website for RAG". Covers single-page scraping, full-site crawling, structured extraction, and LLM-ready output.
tools
Expert guidance for Firebase, Google's platform for building and scaling web and mobile applications. Helps developers set up authentication, Firestore/Realtime Database, Cloud Functions, hosting, storage, and analytics using Firebase's SDK and CLI.
development
When the user needs to build file upload functionality for a web application. Use when the user mentions "file upload," "image upload," "upload endpoint," "multipart upload," "presigned URL," "S3 upload," "file validation," "upload to cloud storage," or "accept user files." Handles upload endpoints, file validation (type, size, magic bytes), cloud storage integration, and upload status tracking. For image/video processing after upload, see media-transcoder.