Skip to content

8trafficai/reddit-subreddit-persona

v0.1.0MIT

Build a source-backed aggregate subreddit register for original post and comment drafting.

reddit-subreddit-persona

A source-backed Agent Skill for learning a subreddit's aggregate community register and using it to draft original posts or comments. It returns exact Reddit permalinks for provenance, keeps post and comment patterns separate, and checks drafts for phrase overlap with sampled sources.

It does not imitate individual authors, promise virality, publish to Reddit, or infer sensitive traits about users.

Synthetic contract proof: zero fetch calls, zero Reddit writes, copy probe blocked, and no sampled post or comment excerpts emitted

Illustrative summary of the compact JSON below; all data is fabricated.

30-second offline test

This zero-input check uses an embedded, fabricated fixture. The verifier itself needs no Reddit account, OAuth credential, network access, real source text, or user data, and it cannot publish anything. It verifies only the installed aggregation and draft-copy-guard contracts; it is not a source-backed live persona, a drafting-quality evaluation, or permission to process Reddit data.

Input: none. Install the skill project-locally for Codex, then run the verifier unchanged:

npx skills add L4A-ai/reddit-subreddit-persona --skill reddit-subreddit-persona --agent codex --yes
node .agents/skills/reddit-subreddit-persona/examples/verify-synthetic-contract.mjs

For another supported agent, use the same installer and select that agent instead; its installed skill directory may differ, so run the bundled verifier from the path reported by the installer.

Exact expected one-line stdout:

{"schema_version":"1.0","fixture":"synthetic-only","status":"ok","aggregation":{"post_ready":true,"post_authors":8,"comment_ready":true,"comment_authors":12,"comment_threads":4,"registers_separate":true},"draft_guard":{"copy_probe_blocked":true,"original_probe_passed":true,"source_text_exposed":false},"safety":{"oauth_used":false,"network_requests":0,"reddit_writes":0,"write_surface_absent":true,"publishing_supported":false},"passed":true}

Got that exact line, a mismatch, or an install/command failure? Submit it through the structured tester form. Paste only the compact JSON or one sanitized error line—never credentials, usernames, local paths, real Reddit content, or full terminal logs.

Proof, without pretending the fixture is Reddit

Fabricated data only. This verifier checks the skill's mechanics. It does not describe a real subreddit, score writing quality, or predict votes.

ContractFabricated inputObserved result
Separate evidence8 posts from 8 authors; 12 comments from 12 authors across 4 threadsBoth registers ready and remain separate
Originality controlA planted phrase exceeding the 8-token threshold plus a separately worded probeCopied probe blocked; original probe passed
Offline boundaryInstrumented zero-input verifier0 fetch calls; bundled write-surface check passed; publishing unsupported
Output surfaceDefault source ledgerNo sampled post/comment excerpts emitted

See the exact verifier source and validation workflow. A pass checks installation and contract behavior only—not truth, usefulness, community fit, or likely performance.

Full synthetic input → draft demo

Synthetic product demo showing fabricated input, aggregate register metrics, and an originality-lint pass

Prepared 2026-08-07. This source-linked card is deterministic fabricated product-demo evidence, not evidence of live Reddit access, community fit, publication, install, adoption, campaign attribution, organic users, or performance.

The zero-input verifier above checks mechanics. The full product demo separately exposes the exact fabricated input and the complete agent-produced output so drafting quality can be evaluated rather than assumed. It runs the shipping analyzer and linter against 10 fabricated posts and 16 fabricated comments, then checks a 54-character title and 277-character body with zero source-text exposure, lint violations, style warnings, network requests, or Reddit writes.

Run it offline from the repository root:

node examples/synthetic-product-demo/run-demo.mjs

Everything in that demo—including the subreddit, project, scores, measurements, and permalinks—is visibly fabricated and marked must not publish. It is a reproducible product evaluation, not a live Reddit profile, campaign result, testimonial, or organic-user claim.

What it produces

  • A post register: title/body structure, opening moves, formatting, flair distribution, and evidence sufficiency.
  • A comment register: reply length, openings, questions, links/code, and thread diversity.
  • A source ledger with exact permalinks, attribution, rank/score snapshots, and no source body text by default.
  • A salted-hash copy guard that blocks long contiguous overlap and excessive 5-gram similarity without echoing copied source phrases.
  • An evidence status of ok, partial, or insufficient_evidence; sparse samples are never presented as a confident persona.

Reddit API setup

Live collection is deliberately fail-closed. You need an approved Reddit OAuth Data API use case and a valid access token:

export REDDIT_ACCESS_TOKEN='...'
export REDDIT_USER_AGENT='script:reddit-subreddit-persona:0.1.0 (by /u/your-account)'
export REDDIT_PERSONA_APPROVED_USE=1
export REDDIT_PERSONA_LLM_PROCESSOR_APPROVED=1

Run a preflight and create a profile:

node skills/reddit-subreddit-persona/scripts/subreddit-persona.mjs doctor
node skills/reddit-subreddit-persona/scripts/subreddit-persona.mjs profile selfhosted > reddit-persona-selfhosted.json

The CLI uses OAuth GET endpoints only. Raw post/comment text is not emitted in normal profile mode; community descriptions and rules remain clearly marked as untrusted text. The separately gated excerpt mode is capped at 12 words per field and should be used only when the processor and use case are explicitly approved.

See setup and policy and the analysis method before live use.

Only after doctor reports all gates true

Ask your agent:

Use $reddit-subreddit-persona to profile r/selfhosted and draft an original post.
Include the source permalinks separately from the draft.

Or for a comment:

Use $reddit-subreddit-persona to draft three context-aware replies to this Reddit thread.
Keep the target thread separate from the historical style evidence.

This project is unofficial and is not affiliated with or endorsed by Reddit.

Develop

Node.js 20+ is required; there are no runtime dependencies.

npm run validate

Tests cover the zero-input synthetic contract, offline analysis, Unicode, sparse evidence, source attribution, expiry, copy detection, OAuth/rate-limit behavior, secret redaction, shell-injection resistance, symlinked installation, and the absence of Reddit write endpoints.