Skip to content

Commit 99be929

Browse files
fidgetcodingruvnet
andcommitted
Add Granola/GCal MCPs, /gitfix skill, ctg token guard, cbrain caution, MCP check, Telegram loop fix
- step-6: Added Granola MCP (HTTP, no creds) and Google Calendar MCP (OAuth) as options 3 and 4 - step-1: ctg moved from alias to ~/.local/bin script with token guard; cbraintg gets same guard; migrates old alias - step-final: Installs /gitfix skill on every run; self-test verifies it - gitfix-skill/SKILL.md: New skill — full repo consistency audit across all scripts and docs - README: Quick MCP check before cbrain, cbrain caution (Step 7 required), Telegram loop warning in Step 8, /gitfix in Final Step, all Installation Order + You're Ready lists updated - CHEATSHEET: /gitfix in skills table, ctg/cbrain corrected, key-distinction note updated - update.sh: /gitfix added to end-of-run skills summary Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent e3f2d23 commit 99be929

7 files changed

Lines changed: 517 additions & 24 deletions

File tree

CHEATSHEET.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ These aliases are added to your `~/.zshrc` (or `~/.bashrc`) and available in any
3939
| `cc` | Short alias for `claude` |
4040
| `ccr` | Resume last Claude conversation (`claude --resume`) |
4141
| `ccc` | Continue last Claude conversation (`claude --continue`) |
42-
| `cbrain` | Launch Claude Code in your 2ndBrain vault with skip-permissions *(requires Obsidian — Step 7)* |
42+
| `cbrain` | Launch Claude Code in your 2ndBrain vault with skip-permissions *(requires Step 7 — Second Brain setup. Do not use until your vault exists.)* |
4343
| `cbraintg` | Same as `cbrain` but with Telegram channel connected |
4444
| `ctg` | Skip-permissions + Telegram channel connected (any directory) |
4545
| `g2` | Tile 2 Ghostty windows side by side, filling your screen *(requires Ghostty — Bonus step, macOS only)* |
@@ -97,9 +97,10 @@ These are custom skills installed by the setup scripts. Type them inside a Claud
9797
| `/rhive <goal>` | Step 3 | Launch a queen-led autonomous hive-mind with raft consensus |
9898
| `/w4w` | Step 3 | Maximum attention to detail — word for word, line for line. No skipping, no summarizing. Also works without the slash — just type `w4w` |
9999
| `/safetycheck` | Step 9 | Security audit — scans any project for exposed keys, missing rate limiting, input sanitization gaps, dependency vulnerabilities, and insecure configurations. Also responds to "run a safety check" in plain English |
100+
| `/gitfix` | Final Step | Full repo sync — reads every install script, skill file, and doc in the repo, finds every inconsistency between the code and the documentation, and fixes all of it. Run this any time you've made changes to a repo and need the README, cheatsheet, and all other docs to reflect reality |
100101

101102

102-
> These are **explicit triggers** — you type the command to activate the skill. This is different from the auto-triggered tools below, which respond to natural language. Exception: `/w4w` also works without the slash — just type `w4w` anywhere in your message. `/rmini` is the compact version of `/rswarm` — 5 agents instead of 15. `/safetycheck` also works in natural language.
103+
> These are **explicit triggers** — you type the command to activate the skill. This is different from the auto-triggered tools below, which respond to natural language. Exception: `/w4w` also works without the slash — just type `w4w` anywhere in your message. `/rmini` is the compact version of `/rswarm` — 5 agents instead of 15. `/safetycheck` also works in natural language ("run a safety check"). `/gitfix` also works in natural language ("fix the github", "sync the repo", "update the readme").
103104
104105
---
105106

README.md

Lines changed: 81 additions & 13 deletions
Large diffs are not rendered by default.

gitfix-skill/SKILL.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Git Fix — Full Repo Sync
2+
3+
When this skill is invoked, perform a comprehensive audit of the current GitHub repository — reading every relevant local file, cross-referencing all documentation, and fixing every inconsistency so the repo is fully in sync.
4+
5+
## Invocation
6+
7+
This skill activates when the user types `/gitfix`, or says "gitfix", "fix the github", "sync the repo", "update the readme", "the github is out of date", or "make sure the repo matches the code".
8+
9+
## What This Skill Does
10+
11+
`/gitfix` is a full-repo consistency pass. It reads everything — install scripts, skill files, config files, the README, the cheatsheet, troubleshooting sections, tables, step descriptions, and any other documentation — and fixes every place where the docs don't match reality.
12+
13+
This is not a partial update. When `/gitfix` runs, every section of every doc file gets checked against the actual state of the repo.
14+
15+
## Execution
16+
17+
### Phase 1 — Understand the Repo Structure
18+
19+
Before reading any file, build a complete map of the repo:
20+
21+
1. List all top-level directories and files
22+
2. For each `step-*/`, `bonus-*/`, `gitfix-skill/`, and other feature folders, list their contents
23+
3. Note every install script (`*.sh`), skill file (`SKILL.md`), and documentation file (`*.md`)
24+
4. Identify the primary documentation files: `README.md`, `CHEATSHEET.md`, `SECURITY.md`, and any files in `README-SECTIONS/` or `docs/`
25+
26+
Do not skip any folder. The map must be complete before Phase 2 begins.
27+
28+
### Phase 2 — Read Everything
29+
30+
Read every file that could affect documentation accuracy:
31+
32+
**Install scripts** — Read each `step-*/install*.sh` and `step-final/step-final-install.sh`:
33+
- What does each step actually install?
34+
- What commands, aliases, or scripts does it create?
35+
- What credentials or prerequisites does it require?
36+
- What are the exact command names (aliases, scripts in `~/.local/bin/`, etc.)?
37+
38+
**Skill files** — Read every `*/SKILL.md` and `~/.claude/skills/*/SKILL.md`:
39+
- What is the skill's invocation trigger?
40+
- What does it do?
41+
- Which step installs it?
42+
43+
**The one-shot script** (`update.sh`) — Read it completely:
44+
- Which steps does it run?
45+
- Which steps are skipped in non-interactive mode and why?
46+
- What does it print at the end?
47+
48+
**Bonus scripts** — Read `bonus-*/`:
49+
- What do they install?
50+
- Are they optional or required?
51+
52+
**Config and utility files** — Read `uninstall.sh`, any files in `docs/`, `README-SECTIONS/`, `templates/`, and `tests/` that contain documentation-relevant content.
53+
54+
### Phase 3 — Read All Documentation
55+
56+
Read the full content of every documentation file:
57+
58+
- `README.md` — every section: Quick Nav, overview blurbs, step-by-step sections, troubleshooting, "You're Ready", Installation Order table, Staying Up to Date, Appendix
59+
- `CHEATSHEET.md` — every table and section
60+
- `SECURITY.md` — verify it reflects current security practices
61+
- Any `.md` files in `README-SECTIONS/`, `docs/`, or bonus folders
62+
63+
Read them fully. Do not skim.
64+
65+
### Phase 4 — Cross-Reference and Find Every Gap
66+
67+
Compare what the code actually does (Phase 2) against what the docs say (Phase 3). Find every discrepancy:
68+
69+
**Step descriptions** — Does the README describe each step accurately?
70+
- Correct name and number?
71+
- Correct description of what it installs?
72+
- Correct time estimate?
73+
- Correct prerequisites?
74+
75+
**Quick nav table** — Does it list every step, bonus, and section that exists?
76+
77+
**Install commands in docs** — Are all `curl` install commands accurate? Do they point to the right script paths?
78+
79+
**Command tables** — Does the cheatsheet list every alias, script, and command that step-1 actually installs? (`cskip`, `cc`, `ccr`, `ccc`, `ctg`, `cbrain`, `cbraintg` — check all)
80+
81+
**Skills table** — Does the cheatsheet list every skill? Is the "Installed in" column accurate for each?
82+
83+
**Step detail sections** — For each step's full section in the README:
84+
- Do the tool descriptions match what's actually installed?
85+
- Are the "What it does" bullet points accurate?
86+
- Are any new tools missing?
87+
- Are any removed tools still listed?
88+
89+
**Troubleshooting section** — Is every known issue documented? Are the fix instructions accurate?
90+
91+
**One-shot / update.sh coverage** — Does `update.sh` run every step? Are any new steps missing from it?
92+
93+
**Installation Order table** — Does it list every step including any added since it was last updated?
94+
95+
**"You're Ready" section** — Is the daily command still `cbrain`? Are the command descriptions accurate?
96+
97+
**CHEATSHEET auto-triggered tools table** — Does it reflect the actual MCP servers installed across all steps?
98+
99+
**Cross-references between docs** — Does the README point to the right section anchors? Do links resolve?
100+
101+
### Phase 5 — Fix Everything
102+
103+
Fix every gap found in Phase 4. Apply edits in this order:
104+
105+
1. Quick nav table — add/remove/correct entries
106+
2. Overview blurbs — update step descriptions to match reality
107+
3. Step detail sections — fix tool descriptions, add missing tools, remove stale ones
108+
4. Troubleshooting — add missing issues, update stale fix instructions
109+
5. CHEATSHEET command table — sync with actual aliases and scripts
110+
6. CHEATSHEET skills table — add new skills, update install step references
111+
7. CHEATSHEET auto-triggered tools — sync with actual MCP servers
112+
8. Installation Order table — ensure all steps listed
113+
9. "You're Ready" section — verify accuracy
114+
10. `update.sh` — add any missing step calls, fix any stale step references
115+
11. Any other file where a discrepancy was found
116+
117+
For each fix, make the edit precisely. Do not rewrite sections that are already accurate. Do not add padding or filler. Match the existing tone and formatting exactly.
118+
119+
### Phase 6 — Verify and Report
120+
121+
After all fixes are applied:
122+
123+
1. Re-read the modified sections to confirm edits are correct
124+
2. Check that no new inconsistencies were introduced
125+
3. Produce a concise summary report:
126+
127+
```
128+
/gitfix complete
129+
130+
Fixed:
131+
- [list each change made, one line each]
132+
133+
Verified (no changes needed):
134+
- [list sections that were checked and already accurate]
135+
136+
Watch list (could not verify — manual check recommended):
137+
- [anything that requires human judgment or external verification]
138+
```
139+
140+
Do not produce the report until all fixes are applied. The report is the last thing output.
141+
142+
## Rules
143+
144+
- **Read before fixing.** Never edit a file you haven't fully read in this session.
145+
- **Precision over coverage.** A precise fix to the right line is better than a sweeping rewrite of a section.
146+
- **Match the existing style.** Every repo has a voice. Match it. Don't introduce new formatting patterns.
147+
- **No invented content.** If you don't know the current state of something, read the file. Don't guess.
148+
- **Flag what you can't verify.** If something requires running a command or checking an external URL, flag it in the Watch list rather than silently skipping it.
149+
- **Touch every section.** The value of `/gitfix` is that nothing gets missed. If a section is fine, say so in the report. If it's wrong, fix it.

step-1/step-1-install.sh

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ install_claude_code() {
234234
fi
235235
for alias_line in \
236236
"alias cskip='claude --dangerously-skip-permissions'" \
237-
"alias ctg='claude --dangerously-skip-permissions --channels plugin:telegram@claude-plugins-official'" \
238237
"alias cc='claude'" \
239238
"alias ccr='claude --resume'" \
240239
"alias ccc='claude --continue'"; do
@@ -247,7 +246,13 @@ install_claude_code() {
247246
if [ "$ALIASES_ADDED" -gt 0 ]; then
248247
success "Added $ALIASES_ADDED new shortcut(s) to $SHELL_RC"
249248
else
250-
success "All shortcuts already configured (cskip, ctg, cc, ccr, ccc)"
249+
success "All shortcuts already configured (cskip, cc, ccr, ccc)"
250+
fi
251+
252+
# Migrate old ctg alias → script (alias can't do token check; script can)
253+
if grep -q 'alias ctg=' "$SHELL_RC" 2>/dev/null; then
254+
sed -i.bak '/alias ctg=/d' "$SHELL_RC"
255+
info "Removed old ctg alias from $SHELL_RC (replaced by ~/.local/bin/ctg)"
251256
fi
252257

253258
# Add ~/.local/bin to PATH if not already present
@@ -288,11 +293,53 @@ CBRAIN_EOF
288293
chmod +x "$HOME/.local/bin/cbrain"
289294
success "cbrain command installed to ~/.local/bin/cbrain"
290295

296+
# Install ctg command (Telegram + skip-permissions, any directory)
297+
info "Installing ctg command to ~/.local/bin..."
298+
cat > "$HOME/.local/bin/ctg" << 'CTG_EOF'
299+
#!/usr/bin/env bash
300+
# ctg — Launch Claude Code with Telegram channel + dangerously-skip-permissions
301+
# Checks for a valid bot token before launching to avoid an infinite warning loop
302+
303+
TOKEN_FILE="$HOME/.claude/channels/telegram/.env"
304+
305+
if [ ! -f "$TOKEN_FILE" ] || ! grep -q 'TELEGRAM_BOT_TOKEN=.\+' "$TOKEN_FILE" 2>/dev/null; then
306+
echo ""
307+
echo "Telegram bot token not configured."
308+
echo "Run Step 8 to set it up:"
309+
echo ""
310+
echo " bash <(curl -fsSL https://raw.githubusercontent.com/lorecraft-io/cli-maxxing/main/step-8/step-8-install.sh)"
311+
echo ""
312+
echo "Or use 'cskip' to launch Claude without Telegram."
313+
echo ""
314+
exit 1
315+
fi
316+
317+
exec claude --dangerously-skip-permissions --channels plugin:telegram@claude-plugins-official "$@"
318+
CTG_EOF
319+
chmod +x "$HOME/.local/bin/ctg"
320+
success "ctg command installed to ~/.local/bin/ctg"
321+
291322
# Install cbraintg command (cbrain + Telegram channel)
292323
info "Installing cbraintg command to ~/.local/bin..."
293324
cat > "$HOME/.local/bin/cbraintg" << 'CBRAINTG_EOF'
294325
#!/usr/bin/env bash
295326
# cbraintg — Launch Claude Code in 2ndBrain vault with full permissions + Telegram
327+
# Checks for a valid bot token before launching to avoid an infinite warning loop
328+
329+
TOKEN_FILE="$HOME/.claude/channels/telegram/.env"
330+
331+
if [ ! -f "$TOKEN_FILE" ] || ! grep -q 'TELEGRAM_BOT_TOKEN=.\+' "$TOKEN_FILE" 2>/dev/null; then
332+
echo ""
333+
echo "Telegram bot token not configured."
334+
echo "Run Step 8 to set it up:"
335+
echo ""
336+
echo " bash <(curl -fsSL https://raw.githubusercontent.com/lorecraft-io/cli-maxxing/main/step-8/step-8-install.sh)"
337+
echo ""
338+
echo "Or use 'cbrain' to launch without Telegram."
339+
echo ""
340+
exit 1
341+
fi
342+
296343
for candidate in \
297344
"$HOME/Desktop/WORK/OBSIDIAN/2ndBrain" \
298345
"$HOME/Desktop/2ndBrain" \
@@ -374,14 +421,14 @@ run_self_test() {
374421

375422
# Shell aliases
376423
ALIAS_PASS=0
377-
ALIAS_TOTAL=5
378-
for alias_name in cskip ctg cc ccr ccc; do
424+
ALIAS_TOTAL=4
425+
for alias_name in cskip cc ccr ccc; do
379426
if grep -q "alias ${alias_name}=" "$SHELL_RC" 2>/dev/null; then
380427
ALIAS_PASS=$((ALIAS_PASS + 1))
381428
fi
382429
done
383430
if [ "$ALIAS_PASS" -eq "$ALIAS_TOTAL" ]; then
384-
success "TEST: shell aliases — all $ALIAS_TOTAL configured (cskip, ctg, cc, ccr, ccc)"
431+
success "TEST: shell aliases — all $ALIAS_TOTAL configured (cskip, cc, ccr, ccc)"
385432
TEST_PASS=$((TEST_PASS + 1))
386433
else
387434
soft_fail "TEST: shell aliases — only $ALIAS_PASS/$ALIAS_TOTAL found in $SHELL_RC"
@@ -397,6 +444,15 @@ run_self_test() {
397444
TEST_FAIL=$((TEST_FAIL + 1))
398445
fi
399446

447+
# ctg command
448+
if [ -x "$HOME/.local/bin/ctg" ]; then
449+
success "TEST: ctg command — installed at ~/.local/bin/ctg"
450+
TEST_PASS=$((TEST_PASS + 1))
451+
else
452+
soft_fail "TEST: ctg command — not found or not executable"
453+
TEST_FAIL=$((TEST_FAIL + 1))
454+
fi
455+
400456
# cbraintg command
401457
if [ -x "$HOME/.local/bin/cbraintg" ]; then
402458
success "TEST: cbraintg command — installed at ~/.local/bin/cbraintg"

0 commit comments

Comments
 (0)