$npx -y skills add AlekseiUL/sprut-agent-kit --skill redditBrowse, search, post, and moderate Reddit. Read-only works without auth; posting/moderation requires OAuth setup. Use when user mentions Reddit, wants to search subreddits, read threads, or post on Reddit. Triggers on 'reddit', 'subreddit', 'реддит'.
| 1 | |
| 2 | |
| 3 | Browse, search, post to, and moderate subreddits. Read-only actions work without auth; posting/moderation requires OAuth setup. |
| 4 | |
| 5 | ## Setup (for posting/moderation) |
| 6 | |
| 7 | 1. Go to https://www.reddit.com/prefs/apps |
| 8 | 2. Click "create another app..." |
| 9 | 3. Select "script" type |
| 10 | 4. Set redirect URI to `http://localhost:8080` |
| 11 | 5. Note your client ID (under app name) and client secret |
| 12 | 6. Set environment variables: |
| 13 | ```bash |
| 14 | export REDDIT_CLIENT_ID="your_client_id" |
| 15 | export REDDIT_CLIENT_SECRET="your_client_secret" |
| 16 | export REDDIT_USERNAME="your_username" |
| 17 | export REDDIT_PASSWORD="your_password" |
| 18 | ``` |
| 19 | |
| 20 | ## Read Posts (no auth required) |
| 21 | |
| 22 | ```bash |
| 23 | # Hot posts from a subreddit |
| 24 | node {baseDir}/scripts/reddit.mjs posts wallstreetbets |
| 25 | |
| 26 | # New posts |
| 27 | node {baseDir}/scripts/reddit.mjs posts wallstreetbets --sort new |
| 28 | |
| 29 | # Top posts (day/week/month/year/all) |
| 30 | node {baseDir}/scripts/reddit.mjs posts wallstreetbets --sort top --time week |
| 31 | |
| 32 | # Limit results |
| 33 | node {baseDir}/scripts/reddit.mjs posts wallstreetbets --limit 5 |
| 34 | ``` |
| 35 | |
| 36 | ## Search Posts |
| 37 | |
| 38 | ```bash |
| 39 | # Search within a subreddit |
| 40 | node {baseDir}/scripts/reddit.mjs search wallstreetbets "YOLO" |
| 41 | |
| 42 | # Search all of Reddit |
| 43 | node {baseDir}/scripts/reddit.mjs search all "stock picks" |
| 44 | ``` |
| 45 | |
| 46 | ## Get Comments on a Post |
| 47 | |
| 48 | ```bash |
| 49 | # By post ID or full URL |
| 50 | node {baseDir}/scripts/reddit.mjs comments POST_ID |
| 51 | node {baseDir}/scripts/reddit.mjs comments "https://reddit.com/r/subreddit/comments/abc123/..." |
| 52 | ``` |
| 53 | |
| 54 | ## Submit a Post (requires auth) |
| 55 | |
| 56 | ```bash |
| 57 | # Text post |
| 58 | node {baseDir}/scripts/reddit.mjs submit yoursubreddit --title "Weekly Discussion" --text "What's on your mind?" |
| 59 | |
| 60 | # Link post |
| 61 | node {baseDir}/scripts/reddit.mjs submit yoursubreddit --title "Great article" --url "https://example.com/article" |
| 62 | ``` |
| 63 | |
| 64 | ## Reply to a Post/Comment (requires auth) |
| 65 | |
| 66 | ```bash |
| 67 | node {baseDir}/scripts/reddit.mjs reply THING_ID "Your reply text here" |
| 68 | ``` |
| 69 | |
| 70 | ## Moderation (requires auth + mod permissions) |
| 71 | |
| 72 | ```bash |
| 73 | # Remove a post/comment |
| 74 | node {baseDir}/scripts/reddit.mjs mod remove THING_ID |
| 75 | |
| 76 | # Approve a post/comment |
| 77 | node {baseDir}/scripts/reddit.mjs mod approve THING_ID |
| 78 | |
| 79 | # Sticky a post |
| 80 | node {baseDir}/scripts/reddit.mjs mod sticky POST_ID |
| 81 | |
| 82 | # Unsticky |
| 83 | node {baseDir}/scripts/reddit.mjs mod unsticky POST_ID |
| 84 | |
| 85 | # Lock comments |
| 86 | node {baseDir}/scripts/reddit.mjs mod lock POST_ID |
| 87 | |
| 88 | # View modqueue |
| 89 | node {baseDir}/scripts/reddit.mjs mod queue yoursubreddit |
| 90 | ``` |
| 91 | |
| 92 | ## Notes |
| 93 | |
| 94 | - Read actions use Reddit's public JSON API (no auth needed) |
| 95 | - Post/mod actions require OAuth - run `login` command once to authorize |
| 96 | - Token stored at `~/.reddit-token.json` (auto-refreshes) |
| 97 | - Rate limits: ~60 requests/minute for OAuth, ~10/minute for unauthenticated |