reddit-add-post

reddit-add-post is a command for coding agents from agamjn/rising. It costs 36 tokens per session (780 once invoked), scanned A, original, MIT.

A command that records Reddit posts you made by using their URLs. It appends them to a history file and refreshes category data for a local analysis system.

In plain words
What is it for?
Use it after posting on Reddit to log one or more post links, provided the current folder has already been prepared by the Reddit setup command.
Why use it?
It keeps your posting history organized so later tools can learn from the topics and results of earlier posts.

Command

Part of the rising plugin — 1 skill, 5 commands, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/agamjn/rising/reddit-add-post
Clone the repo
git clone --depth 1 https://github.com/agamjn/rising

Or install rising, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reddit-add-post

README.md
[![agentmods](https://agentmods.dev/badge/commands/agamjn/rising/reddit-add-post.svg)](https://agentmods.dev/commands/agamjn/rising/reddit-add-post)
Your own site
<a href="https://agentmods.dev/commands/agamjn/rising/reddit-add-post"><img src="https://agentmods.dev/badge/commands/agamjn/rising/reddit-add-post.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 780 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00780
Opus 5 $0.00018 $0.00390
Sonnet 5 $0.00007 $0.00156
Haiku 4.5 $0.00004 $0.00078

Measured 5d ago against content hash 09f0d4355c34, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reddit-add-post scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

(**Never use WebFetch for Reddit URLs.** Reddit rejects requests without a conformant User-Agent; only Bash + curl with `-A "$UA"` works reliably.)
commands/reddit-add-post.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You log Reddit posts the user made into posts-history.md so the performance analyzer and writing-style analyzer can use them.

Pre-flight check

  • Confirm CWD has posts-history.md AND .rising/config.json. If either is missing, stop: "This folder doesn't look set up. Run /reddit-setup first."
  • Read $ARGUMENTS for the URL(s). If empty, ask: "Paste the post URL(s), one per line:"

Capture the User-Agent for all Reddit calls:

USERNAME=$(jq -r .reddit_username .rising/config.json)
UA="script:com.github.agamjn.rising:v0.1.0 (by /u/${USERNAME})"

(Never use WebFetch for Reddit URLs. Reddit rejects requests without a conformant User-Agent; only Bash + curl with -A "$UA" works reliably.)

Procedure

For each URL, in parallel (single message, multiple Bash tool calls):

  1. Normalize the URL (strip query strings, fragments, trailing slashes). Validate that the host is reddit.com or redd.it — skip with a warning otherwise.
  2. Derive a stable post id from the URL (the segment after /comments/).
  3. Curl it:
curl -sS --fail-with-body -A "$UA" --connect-timeout 10 --max-time 30 \
  "<normalized-url>.json" \
  -o ".rising/cache/post-${POST_ID}.json"

After the parallel fetches finish, for each cached file:

  1. Parse [0].data.children[0].data for: title, selftext, subreddit, permalink, score, num_comments, created_utc (convert to ISO date), link_flair_text.
  2. Parse [1].data.children for the top 3 comments by score: author, score, body (truncate at 200 chars).
  3. Check whether this URL already exists in posts-history.md (search by permalink). If yes: update its score/num_comments in place. If no: insert a new entry at the top of the post entries (newest first).

Entry format (same as setup):

## <ISO-date> — r/<sub> — "<title>"
- URL: https://reddit.com<permalink>
- Score: <score> | Comments: <num_comments>
- Flair: <link_flair_text or "none">

<selftext or "[link post: <url>]">

**Top comments:**
- (<score>) <username>: <truncated body>
- ...

---

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 78 lines · 36 tokens per session scan A 09f0d4355c34

Subscribe to this mod's changes

reddit-add-post is a command published in the GitHub repository agamjn/rising (17 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 780 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.