Reddit

SkillSearch

Interact with Reddit — browse subreddits, read posts and comments, search content, view user profiles, post comments, vote, save posts, subscribe to subreddits. Use this skill whenever the user mentions Reddit, r/, subreddit, wants to browse Reddit posts, read Reddit discussions, search Reddit, look up Reddit users, or interact with Reddit content. Also trigger when the user pastes a Reddit URL (e.g. reddit.com/r/programming/...) or mentions a subreddit name.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Reddit skill

What this skill tells your AI

The instructions your AI receives, as published by sigcli/sigcli in skills/reddit/SKILL.md and read by ahel’s review.

Browse subreddits, read posts and comments, search content, view user profiles, and interact with Reddit.

Skill Directory

<SKILL_DIR> is the directory containing this SKILL.md file. Determine it ONCE at the start and reuse it.

Setup (run FIRST — every time, before any operation)

You MUST complete this setup before running any script. Do NOT skip this step.

sig status reddit 2>&1

Check the JSON output fields configured and valid:

  • configured: false → run Provider Setup below. Do NOT proceed without completing it.
  • valid: false (but configured: true) → run sig login reddit, then re-check.
  • valid: true → detect proxy (see below), then execute the user's request.

Provider Setup

  1. Read <SKILL_DIR>/references/provider-config.yaml
  2. Append the provider block to ~/.sig/config.yaml under providers:
  3. Ask the user: "Do you need a proxy to access this site?" — if yes, add networkProxy: <url> under the provider in config.yaml
  4. Run sig login reddit (with --network-proxy <url> if proxy was specified)
  5. Verify: run sig status reddit again — must show valid: true before proceeding

Proxy Detection (after provider is valid)

grep -A15 "^\s*reddit:" ~/.sig/config.yaml | grep networkProxy | awk '{print $2}'

If this outputs a URL, prefix ALL python3 commands with HTTPS_PROXY=<url> HTTP_PROXY=<url>. If using socks5, convert to socks5h for python (e.g. socks5://...socks5h://...). If empty, no proxy needed.

Running Scripts

All scripts require setup to be completed first (see above).

Read operations — use sig run to inject cookie (enables authenticated features):

sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_hot.py --cookie "$SIG_REDDIT_COOKIE" --subreddit programming --limit 10'

Write operations — require sig run (cookie is mandatory):

sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_comment.py --cookie "$SIG_REDDIT_COOKIE" --parent t3_1abc --text "Great post!"'

Env var: SIG_REDDIT_COOKIE

On auth error (401/403): run sig login reddit automatically (no user prompt), then retry.

Scripts Reference

All scripts are in this skill's scripts/ directory. Run via Bash tool.

Read Operations

ScriptPurposeAuth
reddit_hot.pyHot posts from a subredditNone
reddit_top.pyTop posts from a subredditNone
reddit_new.pyNew or rising postsNone
reddit_popular.pyPopular posts (/r/popular)None
reddit_post.pyPost detail with commentsNone
reddit_search.pySearch Reddit postsNone
reddit_user.pyUser profile and activityNone
reddit_subreddit.pySubreddit infoNone

Write Operations

ScriptPurposeAuth
reddit_submit.pyCreate a new postRequired
reddit_manage.pyEdit or delete postRequired
reddit_comment.pyPost a commentRequired
reddit_vote.pyUpvote/downvote/unvoteRequired
reddit_save.pySave or unsave a postRequired
reddit_subscribe.pySubscribe/unsubscribeRequired

reddit_hot.py

--subreddit NAME      Subreddit name without r/ prefix (default: all)
--limit N             Max posts to return (default: 25)
--after TOKEN         Pagination token from previous response

reddit_top.py

--subreddit NAME      Subreddit name without r/ prefix (default: all)
--time PERIOD         Time period: hour, day, week, month, year, all (default: day)
--limit N             Max posts to return (default: 25)
--after TOKEN         Pagination token from previous response

reddit_new.py

--subreddit NAME      Subreddit name (default: all)
--sort SORT           Sort: new, rising (default: new)
--limit N             Max posts (default: 25)
--after TOKEN         Pagination token

reddit_popular.py

--limit N             Max posts (default: 25)
--after TOKEN         Pagination token

reddit_post.py

--id ID               Post ID, fullname (t3_xxx), or full Reddit URL (required)
--comments-limit N    Max top-level comments (default: 20)
--sort SORT           Comment sort: best, top, new, controversial, old (default: best)
--depth N             Max comment tree depth (0=unlimited, default: 0)

reddit_search.py

--query TEXT          Search query (required)
--subreddit NAME     Search within a specific subreddit (optional)
--sort SORT          Sort: relevance, hot, top, new, comments (default: relevance)
--time PERIOD        Time filter: hour, day, week, month, year, all (default: all)
--limit N            Max results (default: 25)
--after TOKEN        Pagination token

reddit_user.py

--username NAME       Reddit username without u/ prefix (required)
--include-posts       Include user's recent posts
--include-comments    Include user's recent comments

reddit_subreddit.py

--name NAME           Subreddit name without r/ prefix (required)

reddit_submit.py

--cookie COOKIE       Reddit session cookie (required)
--subreddit NAME      Subreddit to post in (required)
--title TEXT          Post title (required)
--kind KIND           Post type: self, link (default: self)
--text TEXT           Post body text (for self posts)
--url URL             URL to share (for link posts)
--flair-id ID         Flair template ID (from subreddit flair list)
--flair-text TEXT     Flair text

reddit_manage.py

--cookie COOKIE       Reddit session cookie (required)
--id ID               Post/comment ID or fullname (required)
--action ACTION       Action: edit, delete (required)
--text TEXT           New text content (required for edit)

reddit_comment.py

--cookie COOKIE       Reddit session cookie (required)
--parent ID           Parent fullname: t3_xxx (reply to post) or t1_xxx (reply to comment)
--text TEXT           Comment text in markdown (required)

reddit_vote.py

--cookie COOKIE       Reddit session cookie (required)
--id ID               Post/comment ID or fullname (t3_xxx / t1_xxx)
--direction DIR       Vote: up, down, or none (required)

reddit_save.py

--cookie COOKIE       Reddit session cookie (required)
--id ID               Post/comment ID or fullname
--undo                Unsave instead of save (flag)

reddit_subscribe.py

--cookie COOKIE       Reddit session cookie (required)
--subreddit NAME      Subreddit name (required)
--undo                Unsubscribe instead of subscribe (flag)

Safety

Always show the user the title/body and get explicit confirmation before calling reddit_submit.py or reddit_comment.py. Posts and comments are public. Posts can be edited/deleted via reddit_manage.py.

reddit_vote.py and reddit_subscribe.py are reversible — use --direction none to remove a vote, --undo to unsubscribe.

Key Concepts

Subreddit names — Always pass without the r/ prefix. Use programming not r/programming.

Post IDsreddit_post.py accepts: bare ID (1k2x3y), fullname (t3_1k2x3y), full URL (https://www.reddit.com/r/python/comments/1k2x3y/...), or short link (https://redd.it/1k2x3y).

Fullnames — Reddit identifies objects with type prefixes: t1_ (comment), t3_ (post). Write scripts accept bare IDs or fullnames.

OAuth Bearer — Write operations use the token_v2 cookie value as a Bearer token against oauth.reddit.com. The client extracts it automatically from the session cookie.

Time periods — Used by reddit_top.py and reddit_search.py. Valid: hour, day, week, month, year, all.

Pagination — List endpoints return an after token. Pass it as --after on the next call to get the next page.

NSFW content — Posts flagged as NSFW include "over_18": true in the response.

Error Handling

ErrorCauseFix
HTTP_403Subreddit is privateUse a different subreddit
HTTP_404Subreddit/user not foundCheck the name is spelled correctly
HTTP_429Rate limited by RedditWait a few seconds and retry
HTTP_503Reddit is temporarily downWait and retry
TimeoutNetwork blocked or slowCheck proxy config; retry with HTTPS_PROXY
ConnectionErrorCan't reach reddit.comProxy is missing or wrong; check ~/.sig/config.yaml
AUTH_REQUIREDNo cookie for write opAuto-run sig login (no user prompt needed), retry
NO_TOKENNo token_v2 in cookieAuto-run sig login (no user prompt needed), retry
COMMENT_FAILEDComment rejectedCheck error details
SUBMIT_FAILEDPost creation rejectedCheck subreddit rules
EDIT_FAILEDEdit rejectedMust be the author

Workflow Examples

Browse hot posts

  1. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_hot.py --cookie "$SIG_REDDIT_COOKIE" --subreddit programming --limit 10'
  2. Get next page: sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_hot.py --cookie "$SIG_REDDIT_COOKIE" --subreddit programming --limit 10 --after t3_xxx'

Browse popular posts

  1. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_popular.py --cookie "$SIG_REDDIT_COOKIE" --limit 10'

Find top posts of the week

  1. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_top.py --cookie "$SIG_REDDIT_COOKIE" --subreddit python --time week --limit 10'

Read a post with comments

  1. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_post.py --cookie "$SIG_REDDIT_COOKIE" --id 1k2x3y --comments-limit 30 --sort top'
  2. Or use a full URL: sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_post.py --cookie "$SIG_REDDIT_COOKIE" --id "https://www.reddit.com/r/python/comments/1k2x3y/..." --sort best'

Search for a topic

  1. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_search.py --cookie "$SIG_REDDIT_COOKIE" --query "machine learning" --sort top --time month'

Create a post

  1. Show title/body to user and get confirmation
  2. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_submit.py --cookie "$SIG_REDDIT_COOKIE" --subreddit test --title "My Post" --text "Hello world"'

Edit or delete a post

  1. Edit: sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_manage.py --cookie "$SIG_REDDIT_COOKIE" --id t3_abc123 --action edit --text "Updated content"'
  2. Delete: sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_manage.py --cookie "$SIG_REDDIT_COOKIE" --id t3_abc123 --action delete'

Post a comment

  1. Show comment text to user and get confirmation
  2. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_comment.py --cookie "$SIG_REDDIT_COOKIE" --parent t3_1k2x3y --text "Great post!"'

Upvote a post

  1. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_vote.py --cookie "$SIG_REDDIT_COOKIE" --id t3_1k2x3y --direction up'

Subscribe to a subreddit

  1. sig run reddit -- bash -c 'python3 <SKILL_DIR>/scripts/reddit_subscribe.py --cookie "$SIG_REDDIT_COOKIE" --subreddit python'

Signals

GitHub stars
290
Forks
24
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
reddit-sigcli
Source
github.com/sigcli/sigcli