From thinking
Propose a change to the marketplace repo based on learned patterns — new rules, updated skills, evolved regex patterns. Creates a branch, applies changes, shows diff for review, and raises a PR on approval. Use when patterns have enough evidence to share upstream.
npx claudepluginhub hpsgd/turtlestack --plugin thinkingThis skill is limited to using the following tools:
Stage a change to the marketplace repo based on $ARGUMENTS. This skill handles the full Path 2 workflow: find the repo, create a branch, apply changes, review with the user, and raise a PR.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Calculates TAM/SAM/SOM using top-down, bottom-up, and value theory methodologies for market sizing, revenue estimation, and startup validation.
Stage a change to the marketplace repo based on $ARGUMENTS. This skill handles the full Path 2 workflow: find the repo, create a branch, apply changes, review with the user, and raise a PR.
Read the marketplace source path from settings:
python3 -c "
import json, os
for f in [os.path.expanduser('~/.claude/settings.json'), '.claude/settings.json', '.claude/settings.local.json']:
try:
d = json.load(open(f))
mkts = d.get('extraKnownMarketplaces', {})
for name, cfg in mkts.items():
src = cfg.get('source', {})
path = src.get('path', '')
if path and os.path.isdir(path):
print(f'{name}={path}')
except: pass
"
Verify the path is a git repo with the expected structure:
cd <marketplace-path>
git status
ls plugins/
If the marketplace repo is the current working directory (we're already in it), just use ..
Output: Confirmed marketplace repo path.
Read the pattern file from .claude/learnings/patterns/{pattern-id}.json or ~/.claude/learnings/patterns/.
Check:
count >= 3 (minimum for a proposal)status is detected or pending_review (not already submitted)If the user has a local learned rule (.claude/rules/learned--{topic}.md) that they want to upstream:
If the user describes the change directly, skip the pattern lookup and proceed to Step 3.
Output: The proposed change: what, where, why, and evidence.
Map the learning to a marketplace file:
| Learning type | Target in marketplace |
|---|---|
| New rule (process/convention) | plugins/{category}/{agent}/rules/{topic}.md |
| Skill update (methodology change) | plugins/{category}/{agent}/skills/{skill}/SKILL.md |
| Agent update (responsibility change) | plugins/{category}/{agent}/agents/{agent}.md |
| Regex pattern evolution | scripts/classify-message.py or scripts/analyse-session.py |
| Template improvement | plugins/{category}/{agent}/templates/{template}.md |
| Cross-cutting rule | plugins/practices/coding-standards/rules/{topic}.md |
Read the current version of the target file in the marketplace repo to understand what exists.
Output: Target file path + current content summary.
cd <marketplace-path>
# Ensure we're on a clean main branch
git fetch origin
git checkout main
git pull --ff-only
# Create the proposal branch
BRANCH="learning/$(echo '{topic}' | tr ' ' '-' | tr '[:upper:]' '[:lower:]')"
git checkout -b "$BRANCH"
Apply the change. Depending on type:
Write the complete rule file using Write. Follow the existing rule format (YAML frontmatter with description, markdown body with imperatives).
Use Edit to modify the specific section. Keep changes minimal — only add what the learning requires.
Read the current seed patterns in the script, add the new patterns to the appropriate list. Use Edit.
Output: Files modified on the branch.
cd <marketplace-path>
git diff --stat
git diff
Present the diff to the user with context:
### Proposed change: [title]
**Branch:** `learning/{topic}`
**Pattern:** [pattern-id] — [N] instances across [M] sessions
**Evidence:**
- [session date]: [correction summary]
- [session date]: [correction summary]
- [session date]: [correction summary]
**Files changed:**
[git diff --stat output]
**Diff:**
[git diff output — or summarise if large]
**Local rule:** `.claude/rules/learned--{topic}.md` has been active since [date]
Approve and create PR? (Y/n/edit)
If the user says edit: let them modify the changes, then re-show the diff.
If the user says no: discard the branch (git checkout main && git branch -D learning/{topic}).
If the user says yes: proceed to Step 6.
Output: Diff presented, user decision captured.
cd <marketplace-path>
# Stage and commit
git add <changed-files>
git commit -m "$(cat <<'COMMITEOF'
feat: learned rule — {topic}
Pattern observed {N} times across {M} sessions.
Local rule has been active since {date}.
Evidence:
- {session1}: {summary}
- {session2}: {summary}
- {session3}: {summary}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
COMMITEOF
)"
# Push
git push -u origin "learning/{topic}"
# Create PR
gh pr create \
--title "Learning: {topic}" \
--body "$(cat <<'PREOF'
## Summary
Proposed by the learning system based on observed patterns.
**Pattern:** {description}
**Instances:** {N} across {M} sessions
**First seen:** {date} | **Last seen:** {date}
**Local rule:** Active as `.claude/rules/learned--{topic}.md` since {date}
## Evidence
| Session | Date | Correction |
|---|---|---|
| {id} | {date} | {summary} |
## Change
{what changed and why}
---
🤖 Generated by `/thinking:propose-improvement`
PREOF
)"
# Return to main
git checkout main
Output: PR URL.
After the PR is created:
Update the pattern file (.claude/learnings/patterns/{pattern-id}.json):
{
"status": "pr_submitted",
"pr_url": "https://github.com/...",
"pr_submitted_at": "2026-04-03T..."
}
Add a note to the local learned rule:
<!-- Upstream PR: {pr_url} — remove this rule after PR is merged -->
Log the proposal in .claude/learnings/proposals/:
{
"pattern_id": "pat-...",
"pr_url": "...",
"branch": "learning/...",
"files_changed": [...],
"submitted_at": "...",
"status": "open"
}
Output: Tracking updated, PR URL confirmed.
main. Delete the branch locally after PR creation. If the PR is rejected, note the reason in the pattern file..claude/rules/learned--*.md file remains active locally until the upstream PR is merged. Don't remove it prematurely — it's the safety net.git checkout main at the end, regardless of outcome. Never leave the marketplace repo on a feature branch.## Improvement Proposed: [title]
**PR:** [url]
**Branch:** `learning/{topic}`
**Pattern:** {N} instances across {M} sessions
**Files changed:** [count]
**Status:** PR submitted — awaiting review
### Next steps
1. Review the PR on GitHub
2. If merged, run `/thinking:retrospective` to clean up the local learned rule
3. The marketplace update will take effect on next plugin cache refresh
/thinking:retrospective — identifies patterns and proposes changes. This skill executes the proposal./thinking:learning — captures individual learnings. Patterns emerge from accumulated learnings.