CommunityRédaction et éditiongithub.com

andr-ca/agentharness

Portable engineering policies for coding agents — git, testing, logging, and language conventions written once and referenced everywhere

Qu'est-ce que agentharness ?

agentharness is a Claude Code agent skill that portable engineering policies for coding agents — git, testing, logging, and language conventions written once and referenced everywhere.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add andr-ca/agentharness

Installed? Explore more Rédaction et édition skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Logging

This skill is self-contained for day-to-day use. Deeper reference (needs the full harness checkout): patterns/logging/LOGGING_STANDARDS.md (full mandate and config schema), patterns/logging/logging.yaml.example (tested YAML template), patterns/logging/config_loader.py (Python reference implementation with 99% test coverage).

When this applies

Full structured logging with YAML config, multiple backends, and rotation is required at Production tier. Prototypes: print()/console.log() is fine. Internal tools: structured logging recommended, single-backend acceptable. Check the project's rigor tier first.

Log levels — pick the right one

LevelUse for
TRACEHigh-frequency per-call details; disabled in production by default
DEBUGDeveloper diagnostic info; disabled in production by default
INFONormal operational events (startup, request completed)
WARNINGSomething unexpected but recoverable; worth investigating
ERRORA real failure that the system couldn't recover from
CRITICALThe process must stop or data is corrupted

Rule of thumb: if you'd page someone at 3am, it's ERROR or CRITICAL.

Structured logging: message + fields, never string interpolation

# WRONG: unstructured — can't query or filter by user_id or duration
logger.info(f"Request completed for user {user_id} in {duration}ms")

# RIGHT: message is a static label; context is in structured fields
logger.info("request.completed", user_id=user_id, duration_ms=duration)
// Node/pino/winston equivalent
logger.info({ userId, durationMs }, 'request.completed');

What NOT to log

Never log: passwords, tokens, API keys, full credit card numbers, SSNs, session IDs, or any data under a PII/GDPR policy. Redact or omit before logging. If logging usefulness and secrecy conflict, redact. Do not log the secret "for completeness."

# WRONG: logs the raw token
logger.info("auth.token_issued", token=issued_token)

# RIGHT: log only what's safe to expose
logger.info("auth.token_issued", user_id=user_id, expires_at=exp)

Configuration: YAML template, not hand-rolled

Copy patterns/logging/logging.yaml.example as your starting point:

cp patterns/logging/logging.yaml.example config/logging.yaml

The template supports ${VAR:-default} interpolation, multiple handler backends (file, console, OTEL), and rotation. Hand-rolling a logging schema from scratch duplicates tested work.

Verification before marking work complete

  1. Run the code path and confirm log lines actually emit — don't assume.
  2. Pipe a log line through jq (or equivalent) to confirm it's valid JSON (or whatever your configured format is).
  3. State in the PR description which events you verified emit correctly.

Local vs. production output

Local/dev: human-readable (pretty / dev format, colorized). Production: machine-parseable JSON, no color codes. Configure this via an environment variable, not a code branch:

handlers:
  console:
    formatter: ${LOG_FORMAT:-json}   # override to 'pretty' in dev

Skills associés

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community