Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .agents/skills/tessl__bulk-optimize
1 change: 1 addition & 0 deletions .claude/skills/tessl__bulk-optimize
4 changes: 4 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[mcp_servers.tessl]
type = "stdio"
command = "tessl"
args = [ "mcp", "start" ]
1 change: 1 addition & 0 deletions .codex/skills/tessl__bulk-optimize
12 changes: 12 additions & 0 deletions .cursor/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"mcpServers": {
"tessl": {
"type": "stdio",
"command": "tessl",
"args": [
"mcp",
"start"
]
}
}
}
1 change: 1 addition & 0 deletions .cursor/skills/tessl__bulk-optimize
12 changes: 12 additions & 0 deletions .gemini/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"mcpServers": {
"tessl": {
"type": "stdio",
"command": "tessl",
"args": [
"mcp",
"start"
]
}
}
}
1 change: 1 addition & 0 deletions .gemini/skills/tessl__bulk-optimize
1 change: 1 addition & 0 deletions .github/skills/tessl__bulk-optimize
22 changes: 22 additions & 0 deletions .github/workflows/skill-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Tessl Skill Review β€” runs on PRs that change any SKILL.md; posts scores as one PR comment.
# Docs: https://github.com/tesslio/skill-review
name: Tessl Skill Review

on:
pull_request:
branches: [main]
paths:
- "**/SKILL.md"

jobs:
review:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: tesslio/skill-review@main
# Optional quality gate (off by default):
# with:
# fail-threshold: 70
12 changes: 12 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"mcpServers": {
"tessl": {
"type": "stdio",
"command": "tessl",
"args": [
"mcp",
"start"
]
}
}
}
68 changes: 68 additions & 0 deletions .tessl/tiles/tessl-labs/bulk-optimize/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Bulk Optimize

A skill for bulk optimization of external skills for PR contributions (Alan's tool).

## Purpose

This skill is designed for **contributors** (like Alan) who:
- Improve multiple skills in external/OSS repositories
- Create pull requests with skill improvements
- Need to avoid common PR rejection patterns
- Want to validate changes before submitting

**NOT for**: Personal skill improvement (use `skill-optimizer` instead)

## Status: Ready for Testing βœ…

**Current Score**: 93% (Description: 100%, Content: 85%)

## Key Features

### Safety Checks
- βœ… Auto-generated file detection (avoid googleworkspace scenario)
- βœ… Merge conflict warnings (recent path migrations)
- βœ… Domain expertise preservation (avoid coreyhaines31 scenario)
- βœ… Repository pattern analysis

### Validation
- βœ… Code syntax validation (catch googleworkspace flag errors)
- βœ… Command-line syntax validation
- βœ… File reference validation
- βœ… Post-change score verification

### PR Guidance
- βœ… Recommends one-skill-per-PR when appropriate
- βœ… Risk assessment for high-scoring skills
- βœ… Suggests opening issues first for unsolicited changes
- βœ… Explains rubric for transparency

## Files

- `skills/bulk-optimize/SKILL.md` - Main skill (93% score)
- `skills/bulk-optimize/RUBRIC.md` - Evaluation rubric reference
- `COMPARISON.md` - Analysis vs endpoint approach
- `README.md` - This file

## Usage

For bulk PR work on external repos:

```bash
# Clone/fork external repo
gh repo fork owner/repo --clone

# In Claude Code with bulk-optimize installed
"Use bulk-optimize to improve skills in this repo"
```

The skill will:
1. Run safety checks (auto-generated, conflicts)
2. Analyze all skills
3. Recommend scope (one-skill vs batch)
4. Validate improvements
5. Guide PR creation

## See Also

- **skill-optimizer**: For personal skill improvement (simpler, user-focused)
- **auto-p-o**: Original bash script this replaces
135 changes: 135 additions & 0 deletions .tessl/tiles/tessl-labs/bulk-optimize/skills/bulk-optimize/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
name: bulk-optimize
description: |
Bulk skill optimization for external PR contributions. Greps for "auto-generated" markers to skip generated files, validates Python/JS syntax with ast.parse and node --check, checks git log for recent migrations, runs tessl skill review, and generates PR templates with before/after scores. Use when improving multiple skills in external repositories, preparing bulk PRs, contributing skill improvements, batch editing skills, or mass updating open source skills.
---

# Bulk Optimize

Improve external SKILL.md files for PR contributions using `tessl skill review` plus safety checks that prevent rejected PRs. Respects maintainers by detecting auto-generated files, preserving domain expertise, and suggesting appropriate PR scope.

## For External PR Contributions

Adds safety checks for contributing to other people's repositories. See [TEMPLATES.md](TEMPLATES.md) for lessons from past PR rejections.

## Workflow

### Phase 1: Safety Checks (CRITICAL)

Run before making changes to prevent rejected PRs:

```bash
# 1. Auto-generated file detection
grep -i "auto-generated\|generated by\|DO NOT EDIT\|generator:" <skill-path>/SKILL.md

# 2. Recent migration detection
git log --oneline -10 --all -- <skill-directory>/ | grep -i "migrate\|rename\|move"

# 3. Repository pattern analysis
find . -name "SKILL.md" -type f | head -5 | xargs head -20
```

**If auto-generated detected**: STOP - changes must go to generator source
**If recent migration found**: WARN - may cause merge conflicts
**Note domain patterns**: Preserve expert framing and terminology in Phase 4

### Phase 2: Baseline Evaluation

**Run review for each skill:**

```bash
tessl skill review <skill-path>/SKILL.md
```

Parse output to extract:
- Overall score
- Validation issues
- Description/content dimension scores
- Judge suggestions

**If improving multiple skills:**
- Track baseline scores for all
- Identify which need improvement most
- Consider PR scope (see Phase 7)

### Phase 3: Discover Skill Bundle

Read SKILL.md and list files in its directory. Bundle = SKILL.md + sibling files + referenced files. Use for progressive disclosure improvements.

Use bundle context for recommendations.

### Phase 4: Generate Recommendations (Preserve Domain Expertise)

Review recommendations to preserve valuable domain knowledge. Grep for specialized terminology (CRO, funnel, A/B test, etc.).

**KEEP**: Expert framing with domain concepts ("CRO expert who understands funnel optimization, conversion psychology...")
**REMOVE**: Generic expert statements ("You are an expert at helping users...")

For each issue: what to change, why (dimension + score), before/after, impact, domain check.

### Phase 5: Validate Recommendations

```python
# Validate Python syntax
import ast
ast.parse(code_snippet) # Raises SyntaxError if invalid
```

```bash
# Validate command flags
gh pr create --help | grep -q "\-\-flag" || echo "Invalid"

# Validate file references
[[ -f "$SKILL_DIR/$FILE" ]] || echo "Missing file"
```

### Phase 6: Present Recommendations

Show recommendations with:
- Current state (score)
- Issue explanation
- Recommended change
- Impact
- Domain preservation note

**Get approval per skill or in batch** (user choice).

### Phase 7: PR Scope Assessment

**Multiple skills (15+)**: Recommend one-skill-per-PR for easier review. Start with 2-3 highest-impact, get feedback, iterate.

**High-scoring skills (90%+)**: Open issue first before unsolicited PR. Risk: maintainer may not want cosmetic changes.

### Phase 8: Apply Changes

Apply approved changes to approved skills only.

### Phase 9: Verify Improvements

```bash
# For each changed skill
tessl skill review <skill-path>/SKILL.md
```

Show before/after scores.

### Phase 10: Final Accuracy Review

Re-run validation from Phase 5 on updated SKILL.md. Check:
- βœ“ Code syntax valid
- βœ“ Command flags correct
- βœ“ File references exist
- βœ“ Third-person voice
- βœ“ "Use when..." clause present

Fix issues, then re-run `tessl skill review`.

### Phase 11: PR Guidance

Use commit message format, PR description template, and best practices from [TEMPLATES.md](TEMPLATES.md). Display ready-to-create PR info for user confirmation.

## Notes

- Uses `tessl skill review` plus PR-specific safety checks
- For external PR work on repos you don't maintain
- For personal skill improvement, use `skill-optimizer` instead
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Bulk Optimize Templates

## Commit Message Format

```bash
git commit -m "$(cat <<'EOF'
feat: improve <skill-name> skill quality scores

- Add "Use when..." clause with trigger keywords (+15%)
- Add executable code example (+10%)
- Structure workflow into numbered steps (+8%)

Score improvement: 72% β†’ 95%

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
EOF
)"
```

## PR Description Template

```markdown
Hullo πŸ‘‹ @<maintainer>

I ran your skills through `tessl skill review` and found some targeted
improvements. Here's the before/after:

| Skill | Before | After | Change |
|-------|--------|-------|--------|
| <skill-name> | 72% | 95% | +23% |

<details>
<summary>Changes made</summary>

- Added "Use when..." clause with natural trigger keywords
- Replaced abstract advice with executable code example
- Structured workflow into numbered validation steps

</details>

Honest disclosure β€” I work at @tesslio where we build tooling around
skills like these. Not a pitch - just saw room for improvement and
wanted to contribute.

If you want to run reviews yourself, just `npm install @tessl/cli`
then run `tessl skill review path/to/your/SKILL.md`.

Thanks in advance πŸ™
```

## Display Before Creating PR

```
Ready to create PR:

Branch: improve/<skill-name>
Commit: feat: improve <skill-name> skill quality scores
Files: 1 changed (+15 -8)

PR will be created to: <upstream-repo>

Review changes? [Show diff / Create PR / Cancel]
```

## Best Practices from Successful PRs

βœ… **Concrete workflows** - Numbered steps with validation checkpoints
βœ… **Executable code** - Real, runnable examples (not pseudocode)
βœ… **Token efficiency** - Remove explanations of known concepts
βœ… **Progressive disclosure** - Link to REFERENCE.md vs inlining details
βœ… **One-skill-per-PR** - Easier review, higher acceptance rate

## Past PR Rejections to Avoid

| PR | Issue | Lesson |
|----|-------|--------|
| googleworkspace #320 | Invalid command flags | Validate all command syntax |
| coreyhaines31 #65 | Bundled 15+ skills | One skill per PR for easier review |
| JimLiu #53 | Changed high-scoring skill | Don't touch 90%+ skills without invitation |
| Various | Auto-generated files | Always grep for "auto-generated" markers |
11 changes: 11 additions & 0 deletions .tessl/tiles/tessl-labs/bulk-optimize/tile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "tessl-labs/bulk-optimize",
"version": "0.2.0",
"summary": "Bulk skill optimization for external PR contributions. Detects auto-generated files, merge conflicts, preserves domain expertise, validates syntax. Use when improving multiple external skills for pull requests.",
"private": true,
"skills": {
"bulk-optimize": {
"path": "skills/bulk-optimize/SKILL.md"
}
}
}
Loading