### Example: From Sessions to Skill Workflow Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md This workflow demonstrates how to analyze recent UI/UX fix sessions, start a guided skill build, and then validate and integrate the draft skill. ```bash # 1. I've done many UI/UX fix sessions recently ms analyze --topic "UI fixes" --days 30 # Output: Found 23 sessions with 156 extractable patterns # 2. Start guided build ms build --guided --topic "UI/UX fixes" --stack nextjs-react # 3. Interactive session begins... # - ms presents pattern clusters # - I approve/reject/refine each # - Draft skill emerges # 4. Validate and integrate ms overlap ./draft-skill/ # Check for duplicates ms validate ./draft-skill/ # Best practices check ms add ./draft-skill/ # Add to registry ``` -------------------------------- ### Install Gum Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Install Gum using Homebrew or Go. This is the initial setup step before using any Gum commands. ```bash # Install brew install gum # or: go install github.com/charmbracelet/gum@latest ``` -------------------------------- ### Getting Started with Meta Skill (Bash) Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md Provides essential commands to clone the Meta Skill repository, navigate into the directory, and build the project using Cargo. ```bash git clone https://github.com/dicklesworthstone/meta_skill.git cd meta_skill # Build the project # This will compile the code and create an executable binary. # It may take a few minutes depending on your system. # Ensure you have Rust and Cargo installed. # See: https://www.rust-lang.org/tools/install cargo build --release # Run the application (example) # Replace with actual command if available ./target/release/ms --help # Example of running a specific command (if applicable) ms --version # Further commands might include: ms --config path/to/config.toml ms --input path/to/input.txt ms --output path/to/output.json ``` -------------------------------- ### Install Charm Libraries Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/go-tui.md Installs the latest stable versions of Charm libraries using go get. ```bash go get github.com/charmbracelet/bubbletea@latest \ github.com/charmbracelet/bubbles@latest \ github.com/charmbracelet/lipgloss@latest \ github.com/charmbracelet/huh@latest \ github.com/charmbracelet/glamour@latest \ github.com/charmbracelet/harmonica@latest \ github.com/charmbracelet/log@latest ``` -------------------------------- ### Install ms Directly Source: https://github.com/dicklesworthstone/meta_skill/blob/main/homebrew-tap/README.md Install the ms tool directly in a single command by specifying the full tap and package name. Useful for a quick setup. ```bash brew install dicklesworthstone/tap/ms ``` -------------------------------- ### Example of autonomous generation with progress output Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Demonstrates the command to start autonomous generation and shows an example of the progress output, including phase changes and skill generation status. ```bash $ ms build --autonomous --topics "nextjs-ui,react-hooks" --duration 2h ``` ```text Starting autonomous skill generation Topics: nextjs-ui, react-hooks Max duration: 2 hours Checkpoint interval: 30 minutes Phase 1: Discovery Searching CASS for relevant sessions... Found 47 sessions matching "nextjs-ui" Found 31 sessions matching "react-hooks" Extracting patterns... ━━━ Progress Report (00:05:00) ━━━ Phase: Discovery Patterns: 156 discovered, 0 used Skills: 0 in progress, 0 completed ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Phase 2: Analysis Clustering 156 patterns... Formed 8 clusters (min size: 3) Phase 3: Generation Starting skill "nextjs-ui-accessibility"... ━━━ Progress Report (00:10:00) ━━━ Phase: Generation Patterns: 156 discovered, 23 used Skills: 1 in progress, 0 completed Current: "nextjs-ui-accessibility" (iter 3, quality 0.72) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Checkpoint saved: ~/.local/share/ms/checkpoints/checkpoint-abc123-0001.json ... ━━━ Final Report ━━━ Duration: 01:47:32 Skills generated: 4 - nextjs-ui-accessibility (quality: 0.89) - react-hooks-patterns (quality: 0.84) - nextjs-performance (quality: 0.81) - react-state-management (quality: 0.78) Patterns: 156 discovered, 89 used Checkpoints: 4 created Run 'ms add ~/.local/share/ms/generated/abc123/' to add skills to registry ``` -------------------------------- ### MetaSkill CLI Example Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Example command to load a model and pack slices with a token budget using the MetaSkill CLI. ```bash ms load ntm --pack 800 ``` -------------------------------- ### Installation Section Markdown Template Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/crafting-readme-files/SKILL.md A Markdown template for the installation section of a README, providing a quick install option via curl and bash, with an example for options. ```markdown ## Installation ### Quick Install (Recommended) ```bash curl -fsSL https://raw.githubusercontent.com/user/repo/main/install.sh | bash ``` **With options:** ```bash # Auto-update PATH curl -fsSL https://... | bash -s -- --easy-mode ``` -------------------------------- ### Install Tool with Scoop Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/crafting-readme-files/SKILL.md Installs the tool on Windows using the Scoop package manager. First, add the user's Scoop bucket, then install the tool. ```bash scoop bucket add user https://github.com/user/scoop-bucket ``` ```bash scoop install tool ``` -------------------------------- ### Install and Run Soft Serve Git Server Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Installs Soft Serve using Homebrew, starts the server, and provides commands to clone repositories. Access the Git server via SSH on port 23231. ```bash # Install brew install soft-serve # Start soft serve # Access ssh localhost -p 23231 git clone ssh://localhost:23231/repo ``` -------------------------------- ### Install Shell and Go Tools Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/QUICK-REFERENCE.md Commands to install various shell tools and Go libraries using Homebrew and `go get`. Installs Gum, Glow, VHS, Mods, and multiple Charmbracelet Go libraries. ```bash # Shell tools (all at once) brew install gum glow vhs freeze mods # Go libraries go get github.com/charmbracelet/bubbletea@latest \ github.com/charmbracelet/bubbles@latest \ github.com/charmbracelet/lipgloss@latest \ github.com/charmbracelet/huh@latest \ github.com/charmbracelet/glamour@latest \ github.com/charmbracelet/wish@latest # v2 track (bleeding edge) go get charm.land/bubbletea/v2@latest go get charm.land/lipgloss/v2@latest ``` -------------------------------- ### Start guided skill generation for a topic Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md Begin a guided skill generation process for a specific topic and technology stack. The process involves interactive refinement of patterns. ```bash ms build --guided --topic "UI/UX fixes" --stack nextjs-react ``` -------------------------------- ### Integration Template Example (Markdown) Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md Markdown content for an 'Integration Template', outlining steps for integrating a skill with external systems or services. It includes placeholders for setup commands, configuration examples, and operational commands. ```markdown # Integration Template This template outlines the process for integrating the skill with external services. ## Setup Run the following commands to set up the environment: ```bash {{setup_commands}} ``` ## Configuration Configure the service using the following example: ```yaml {{config_example}} ``` ## Operations Execute the following operations: 1. **Operation 1:** ```bash {{operation_1_command}} ``` 2. **Operation 2:** ```bash {{operation_2_command}} ``` ## Verification {{verification_steps}} ``` -------------------------------- ### Clone, Build, and Install MetaSkill CLI Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Commands to clone the repository, build the project in release mode, and install the CLI locally. ```bash # Clone the repository git clone https://github.com/Dicklesworthstone/meta_skill.git cd meta_skill # Build in release mode cargo build --release # Install locally cargo install --path . ``` -------------------------------- ### Pre-Commit Hook Configuration (Example) Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md An example configuration file for pre-commit hooks, specifying repositories and specific hooks to run. This setup ensures that code is formatted and linted automatically before each commit. ```yaml # .pre-commit-config.yaml repos: - repo: local hooks: - id: run-tests name: Run Unit Tests entry: pytest language: system pass_filenames: false always_run: true - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: - id: flake8 args: [--max-line-length=88] ``` -------------------------------- ### Install ms via Homebrew Source: https://github.com/dicklesworthstone/meta_skill/blob/main/homebrew-tap/README.md Install the ms tool using Homebrew after adding the tap. This command fetches and installs the latest stable version. ```bash brew install ms ``` -------------------------------- ### Install Skill Bundles Source: https://github.com/dicklesworthstone/meta_skill/blob/main/README.md Installs pre-packaged skill sets from a URL or a local file path. Bundles are verified by checksums and hashes. ```bash ms install https://example.com/team-skills.msb ``` ```bash ms bundle install ./local-bundle.msb ``` -------------------------------- ### Manage Skill Bundles for Distribution Source: https://github.com/dicklesworthstone/meta_skill/blob/main/README.md Package, install, and manage skill bundles. Use `ms bundle create` to create a bundle from a directory, `ms bundle install` to install a bundle, and `ms bundle list` to see installed bundles. Check for conflicts and update bundles. ```bash ms bundle create my-bundle --from-dir ./skills ``` ```bash ms bundle install ./my-bundle.msb ``` ```bash ms bundle list ``` ```bash ms bundle show my-bundle ``` ```bash ms bundle conflicts # Check for local modifications ``` ```bash ms bundle update --check # Preview updates ``` ```bash ms bundle update my-bundle --force # Apply with backup ``` -------------------------------- ### Install Skill Bundle Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Installs a skill bundle from a GitHub repository. Allows specifying specific skills, a channel, and verification. ```bash ms bundle install user/skill-bundle ms bundle install user/skill-bundle --skills ntm,dcg # Specific skills only ms bundle install user/skill-bundle --channel beta --verify ``` -------------------------------- ### CLI Examples for Provenance Graph Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md Command-line examples for interacting with the provenance graph, such as building, analyzing, and querying the graph. ```bash ms graph --build ms graph --analyze ms graph --query "node_type=rule" ``` -------------------------------- ### Start A/B Experiment with ms experiment start Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Initiates an A/B experiment for a skill, defining variants and their descriptions. ```bash # Start an A/B experiment with two variants ms experiment start rust-patterns \ --variant v1 --desc "Concise rules-first layout" \ --variant v2 --desc "Examples-first layout" ``` -------------------------------- ### jq Quick Reference Examples Source: https://github.com/dicklesworthstone/meta_skill/blob/main/AGENTS.md Examples of using jq to parse and extract data from command-line tool outputs. ```bash bv --robot-triage | jq '.quick_ref' ``` ```bash bv --robot-triage | jq '.recommendations[0]' ``` ```bash bv --robot-plan | jq '.plan.summary.highest_impact' ``` ```bash bv --robot-insights | jq '.status' ``` ```bash bv --robot-insights | jq '.Cycles' ``` -------------------------------- ### bv Scoping and Filtering Examples Source: https://github.com/dicklesworthstone/meta_skill/blob/main/AGENTS.md Examples demonstrating how to scope bv commands to specific labels, historical points, or pre-filtered recipes. ```bash bv --robot-plan --label backend # Scope to label's subgraph ``` ```bash bv --robot-insights --as-of HEAD~30 # Historical point-in-time ``` ```bash bv --recipe actionable --robot-plan # Pre-filter: ready to work ``` ```bash bv --recipe high-impact --robot-triage # Pre-filter: top PageRank ``` ```bash bv --robot-triage --robot-triage-by-track # Group by parallel work streams ``` ```bash bv --robot-triage --robot-triage-by-label # Group by domain ``` -------------------------------- ### Install ms via Scoop Bucket Source: https://github.com/dicklesworthstone/meta_skill/blob/main/scoop-bucket/README.md Install the ms tool using its Scoop bucket. Ensure the bucket has been added first. ```powershell scoop install ms/ms ``` -------------------------------- ### Initialize File Picker with Options Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Sets up a new file picker, defining allowed file types, the starting directory, and visibility options for hidden files and file sizes. ```go import "github.com/charmbracelet/bubbles/filepicker" fp := filepicker.New() fp.AllowedTypes = []string{'.txt', '.md', '.go'} fp.CurrentDirectory, _ = os.UserHomeDir() fp.ShowHidden = false fp.ShowSize = true fp.ShowPermissions = false // Styling fp.Styles.Selected = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) ``` -------------------------------- ### Core Workflow Example Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/crafting-readme-files/SKILL.md Illustrates a typical workflow for the tool, including initialization, main operation, and viewing results, along with key flags and storage locations. ```bash # 1. Initialize tool init # 2. Main operation tool do-thing # 3. View results tool show Key Flags --flag1 # Description --flag2 # Description Storage - Location 1: path/to/thing - Location 2: path/to/other Notes - Important caveat 1 - Important caveat 2 ``` -------------------------------- ### Start Guided Mode with Focus Areas and Duration Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Starts guided mode with specific focus areas and a set duration. ```bash ms build --guided --focus "rust,async,error-handling" --duration 2h ``` -------------------------------- ### MetaSkill CLI Bundle Installation Flow Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Illustrates the step-by-step process a user follows to install a MetaSkill bundle using the CLI, from resolving the bundle to indexing new skills. ```text ┌─────────────────────────────────────────────────────────────────────────────┐ │ BUNDLE INSTALLATION FLOW │ ├─────────────────────────────────────────────────────────────────────────────┤ │ │ │ $ ms bundle install Dicklesworthstone/rust-toolkit-skills │ │ │ │ 1. Resolve bundle location │ │ └─► GitHub API: GET /repos/Dicklesworthstone/rust-toolkit-skills │ │ └─► Select release channel (stable/beta) │ │ │ │ 2. Fetch bundle manifest │ │ └─► GET bundle.yaml from repo │ │ └─► Verify checksum + signature │ │ │ │ 3. Check dependencies │ │ └─► Recursively resolve and install dependencies │ │ │ │ 4. Download skills │ │ └─► Clone/pull repo to ~/.local/share/ms/bundles/ │ │ └─► Extract skills to ~/.config/ms/skills/ │ │ │ │ 5. Index new skills │ │ └─► Update SQLite registry │ │ └─► Rebuild search indexes │ │ │ │ 6. Report │ │ └─► Show installed skills and any conflicts resolved │ │ │ └─────────────────────────────────────────────────────────────────────────────┘ ``` -------------------------------- ### Get Installed Skill Information Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Retrieves the currently installed skill information, including its installed version, pinned version status, installation timestamp, and source. ```rust /// Get installed version (what's active locally) pub fn get_installed(&self, skill_id: &str) -> Result> { self.db.query_row( "SELECT installed_version, pinned_version, installed_at, source FROM installed_skills WHERE skill_id = ?", params![skill_id], |row| Ok(InstalledSkill { skill_id: skill_id.to_string(), installed_version: Version::parse(&row.get::<_, String>(0)?).unwrap(), pinned_version: row.get::<_, Option>(1)? .map(|s| Version::parse(&s).unwrap()), installed_at: DateTime::parse_from_rfc3339(&row.get::<_, String>(2)?) .unwrap().with_timezone(&Utc), source: row.get(3)?, }), ).optional().map_err(Into::into) } ``` -------------------------------- ### Define and Render Help Menu Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Define key bindings and create a help model to display short or full help menus. Set the width for text wrapping. ```go import ( "github.com/charmbracelet/bubbles/help" "github.com/charmbracelet/bubbles/key" ) // Define key bindings type keyMap struct { Up key.Binding Down key.Binding Help key.Binding Quit key.Binding } func (k keyMap) ShortHelp() []key.Binding { return []key.Binding{k.Help, k.Quit} } func (k keyMap) FullHelp() [][]key.Binding { return [][]key.Binding{ {k.Up, k.Down}, {k.Help, k.Quit}, } } var keys = keyMap{ Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "down"), ), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "toggle help"), ), Quit: key.NewBinding( key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit"), ), } // Create help model h := help.New() h.Width = 80 // Wrap at width // Toggle full/short h.ShowAll = true // Full help h.ShowAll = false // Short help // Render helpView := h.View(keys) ``` -------------------------------- ### Start Guided Iterative Mode Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Initiates the guided iterative mode for autonomous skill generation. Specify the desired duration for the process. ```bash ms build --guided --duration 4h ``` -------------------------------- ### Example Workflow for Session Marking and Skill Building Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md A step-by-step workflow demonstrating how to mark sessions, provide reasons and quality assessments, and integrate these into the skill building process. ```bash $ ms mark --session --type "anti-pattern" --reason "Confusing variable names" $ ms mark --session --type "good-pattern" --quality "high" $ ms highlight --session --start 10 --end 25 --type "code-example" $ ms highlight --session --start 30 --end 45 --type "explanation" $ ms build --from-marked-session --output ./draft-skill/ $ ms add ./draft-skill/ ``` -------------------------------- ### Example Workflow for Marking and Building Skills Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Demonstrates a typical workflow using the ms CLI to mark sessions and then build skills, showing how exemplary and ignored marks influence the process. ```bash # After a great session fixing accessibility issues $ ms mark --exemplary --topics "nextjs,accessibility,aria" \ --reason "Comprehensive aria-hidden fixes across 15 components" \ --quality 5 # After a mediocre session with lots of backtracking $ ms mark --ignore --reason "Too much trial and error, not exemplary" # Later, when building skills $ ms build --guided --topic "accessibility" # → Prioritizes the exemplary session # → Ignores the marked-ignore session # View what's available for a topic $ ms marks list --topic "accessibility" Exemplary sessions (2): ★★★★★ abc123 - "Comprehensive aria-hidden fixes" (nextjs, accessibility) ★★★★☆ def456 - "Screen reader testing patterns" (accessibility, testing) Ignored sessions (1): xyz789 - "Too much trial and error, not exemplary" ``` -------------------------------- ### Dual Version Storage Example Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Demonstrates maintaining version information in both a VERSION file and a script variable for dual storage. ```bash # VERSION file (single source of truth) 1.2.1 # Script variable (for --version flag) VERSION="1.2.1" # Version reading with fallback get_version() { local script_dir script_dir="$(dirname "${BASH_SOURCE[0]}")" if [[ -f "$script_dir/VERSION" ]]; then cat "$script_dir/VERSION" else echo "$VERSION" fi } ``` -------------------------------- ### Quick Install Go Libraries Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Commands for quick installation of infrastructure tools and essential Go libraries for the project, including wish, teatest, and term. ```bash # Infrastructure tools brew install soft-serve pop skate melt # Go libraries go get github.com/charmbracelet/wish@latest \ github.com/charmbracelet/x/exp/teatest@latest \ github.com/charmbracelet/x/term@latest ``` -------------------------------- ### Main Program Entry Point Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/advanced-patterns.md Sets up the main program, enabling debug logging to a file if the DEBUG environment variable is set, and runs the TUI application. ```go func main() { // Enable debug logging to file if os.Getenv("DEBUG") != "" { f, _ := tea.LogToFile("debug.log", "debug") defer f.Close() } p := tea.NewProgram( initialModel(), tea.WithAltScreen(), tea.WithMouseCellMotion(), ) if _, err := p.Run(); err != nil { fmt.Fprintln(os.Stderr, "Error:", err) os.Exit(1) } } ``` -------------------------------- ### Initialize and Use MetaSkill CLI Commands Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Basic commands for initializing the CLI, indexing skills, building a new skill, searching for skills, and getting skill suggestions. ```bash # Initialize ms init --global # Index your existing skills ms index --path /data/projects/agent_flywheel_clawdbot_skills_and_integrations/skills # Start building a skill from your sessions ms build --name my-first-skill # Search for skills ms search "error handling" # Get skill suggestions ms suggest ``` -------------------------------- ### Progressive Disclosure Template for Skills Source: https://github.com/dicklesworthstone/meta_skill/blob/main/BEST_PRACTICES_FOR_WRITING_AND_USING_SKILLS_MD_FILES.md Template for structuring skill documentation, including quick start examples and feature breakdowns. ```markdown ## Quick start [Essential example - <50 lines] ## Features - **Feature A**: See [A.md](references/A.md) - **Feature B**: See [B.md](references/B.md) ## Quick search ```bash grep -i "keyword" references/ ``` ``` -------------------------------- ### File Picker Initialization and Update Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Shows how to initialize the file picker in the `Init` function and process messages in the `Update` function to handle user interactions and selections. ```go // In Init func (m model) Init() tea.Cmd { return m.filepicker.Init() } // In Update fp, cmd = fp.Update(msg) // Check for selection if didSelect, path := fp.DidSelectFile(msg); didSelect { // User selected path } if didSelect, path := fp.DidSelectDisabledFile(msg); didSelect { // User tried to select disallowed file type } ``` -------------------------------- ### Build Skill in Solo Mode (No Coordination) Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Starts a guided skill build without engaging the coordination protocol. Use this when you intend to build a skill independently. ```bash # Build without coordination (solo mode) ms build --guided --topic "error handling" --no-coordinate ``` -------------------------------- ### Workflow Template Example (Markdown) Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md Markdown content for a 'Workflow Template', outlining a structured process with placeholders for specific actions or commands. This serves as a guide for creating skills that follow a sequential workflow. ```markdown # Workflow Template This template provides a structure for creating skills that involve a series of sequential steps. ## Description {{description}} ## Steps 1. **{{step_1_name}}** * Description: {{step_1_description}} * Command: `{{step_1_code}}` 2. **{{step_2_name}}** * Description: {{step_2_description}} * Command: `{{step_2_code}}` ## Conclusion {{conclusion}} ``` -------------------------------- ### Initialize MetaSkill Project Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Initializes the MetaSkill CLI in the current project directory. Use the --global flag to initialize only the global configuration. ```bash ms init ``` ```bash ms init --global ``` -------------------------------- ### Initialize ms Project Source: https://github.com/dicklesworthstone/meta_skill/blob/main/README.md Initializes a new local ms root directory (e.g., .ms/). ```bash ms init ``` -------------------------------- ### Markdown Structure for Progressive Disclosure Source: https://github.com/dicklesworthstone/meta_skill/blob/main/BEST_PRACTICES_FOR_WRITING_AND_USING_SKILLS_MD_FILES.md Illustrates how to structure a SKILL.md file using progressive disclosure. It provides a quick start example and links to advanced features in separate files like FORMS.md and REFERENCE.md. ```markdown # In SKILL.md - overview + pointers ## Quick start [Essential code example] ## Advanced features - **Form filling**: See [FORMS.md](FORMS.md) - **API reference**: See [REFERENCE.md](REFERENCE.md) ``` -------------------------------- ### Vercel Deployment Workflow in GitHub Actions Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Automates deployment to Vercel on new tag pushes. Includes Node.js setup, dependency installation, testing, building, Vercel deployment, database migrations, and a smoke test. ```yaml # .github/workflows/deploy.yml name: Deploy on: push: tags: - 'v*' jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm ci - name: Run tests run: npm test - name: Build run: npm run build - name: Deploy to Vercel uses: amondnet/vercel-action@v25 with: vercel-token: ${{ secrets.VERCEL_TOKEN }} vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} vercel-args: '--prod' - name: Run database migrations run: npm run db:migrate env: DATABASE_URL: ${{ secrets.DATABASE_URL }} - name: Smoke test run: | sleep 30 # Wait for deployment curl -f https://my-app.vercel.app/api/health || exit 1 ``` -------------------------------- ### Build and Install Tool from Source Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/crafting-readme-files/SKILL.md Builds the tool from source using Cargo, then copies the release binary to a local bin directory. This method is suitable for developers or when pre-built packages are unavailable. ```bash git clone https://github.com/user/repo.git cd repo cargo build --release cp target/release/tool ~/.local/bin/ ``` -------------------------------- ### Test Fixtures and Helpers Example (Rust) Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI__CONDENSED.md Demonstrates the implementation of test fixtures and helper functions in Rust to streamline the setup and teardown of test environments. This includes defining a `TestFixture` struct for common testing needs. ```rust use std::fs; use std::io::{self, Write}; use std::path::{Path, PathBuf}; use tempfile::TempDir; // Represents a temporary directory and its contents for testing. pub struct TestFixture { temp_dir: TempDir, base_path: PathBuf, } impl TestFixture { /// Creates a new test fixture with a temporary directory. pub fn new() -> io::Result { let temp_dir = TempDir::new()?; let base_path = temp_dir.path().to_path_buf(); Ok(TestFixture { temp_dir, base_path }) } /// Returns the path to the temporary directory. pub fn path(&self) -> &Path { self.base_path.as_path() } /// Creates a file with the given content at the specified path relative to the fixture's base path. pub fn create_file(&self, file_path: &str, content: &str) -> io::Result { let full_path = self.base_path.join(file_path); if let Some(parent) = full_path.parent() { fs::create_dir_all(parent)?; } let mut file = fs::File::create(&full_path)?; file.write_all(content.as_bytes())?; Ok(full_path) } /// Creates a directory at the specified path relative to the fixture's base path. pub fn create_dir(&self, dir_path: &str) -> io::Result { let full_path = self.base_path.join(dir_path); fs::create_dir_all(&full_path)?; Ok(full_path) } /// Reads the content of a file at the specified path relative to the fixture's base path. pub fn read_file(&self, file_path: &str) -> io::Result { let full_path = self.base_path.join(file_path); fs::read_to_string(full_path) } /// Returns the path to a file within the fixture. pub fn get_path(&self, file_path: &str) -> PathBuf { self.base_path.join(file_path) } } // Automatically cleans up the temporary directory when the fixture goes out of scope. impl Drop for TestFixture { fn drop(&mut self) { // TempDir::new() already handles cleanup on drop, so this is mostly for illustration. // If custom cleanup logic were needed, it would go here. } } // Example usage within a test module #[cfg(test)] mod tests { use super::*; use std::io::Write; #[test] fn test_fixture_creation() -> io::Result<()> { let fixture = TestFixture::new()?; assert!(fixture.path().exists()); Ok(()) } #[test] fn test_create_file() -> io::Result<()> { let fixture = TestFixture::new()?; let file_content = "Hello, Test Fixture!"; let file_path = fixture.create_file("test.txt", file_content)?; assert!(file_path.exists()); let content = fs::read_to_string(&file_path)?; assert_eq!(content, file_content); Ok(()) } #[test] fn test_create_nested_file() -> io::Result<()> { let fixture = TestFixture::new()?; let nested_file_path = fixture.create_file("dir1/subdir/nested.txt", "Nested content")?; assert!(nested_file_path.exists()); assert!(fixture.path().join("dir1/subdir").exists()); Ok(()) } #[test] fn test_create_dir() -> io::Result<()> { let fixture = TestFixture::new()?; let dir_path = fixture.create_dir("my_test_dir")?; assert!(dir_path.exists()); assert!(dir_path.is_dir()); Ok(()) } #[test] fn test_read_file() -> io::Result<()> { let fixture = TestFixture::new()?; let file_path = fixture.create_file("read_test.txt", "Content to be read.")?; let read_content = fixture.read_file("read_test.txt")?; assert_eq!(read_content, "Content to be read."); Ok(()) } #[test] fn test_get_path() { let fixture = TestFixture::new().unwrap(); let expected_path = fixture.path().join("some/file.txt"); assert_eq!(fixture.get_path("some/file.txt"), expected_path); } #[test] fn test_fixture_cleanup() -> io::Result<()> { let mut fixture_path = PathBuf::new(); { let fixture = TestFixture::new()?; fixture_path = fixture.path().to_path_buf(); fixture.create_file("temp.txt", "cleanup test")?; assert!(fixture_path.exists()); assert!(fixture_path.join("temp.txt").exists()); } // fixture goes out of scope here, temp_dir should be cleaned up assert!(!fixture_path.exists()); Ok(()) } } ``` -------------------------------- ### Suggest Next Skill to Build Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md This command suggests the next skill to focus on building based on coverage analysis. It provides details on sessions, patterns, priority, and example patterns, along with a command to start building the skill. ```bash # Suggest next skill to build ms coverage suggest # → Suggested: Build skill for "database migrations" # → Sessions: 23 │ Patterns: 67 │ Priority: 0.89 # → # → Example patterns: # → - "Always run migrations in transaction" # → - "Test rollback before deploying" # → - "Keep migration files small and focused" # → # → Run: ms build --guided --topic "database migrations" ``` -------------------------------- ### BATS Unit Test Example Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Demonstrates a BATS unit test file for utility functions. Includes setup and teardown for the test environment, and tests for version comparison ('version_gt') and timestamp generation ('iso_timestamp'), and a check for gum interactivity. ```bash # tests/unit/test_utils.bats setup() { load '../helpers/test_helper' load '../helpers/assertions' setup_test_environment # Source the functions we're testing source "$(dirname "$BATS_TEST_DIRNAME")/../lib/utils.sh" } teardown() { teardown_test_environment } @test "version_gt: 1.2.0 > 1.1.0" { run version_gt "1.2.0" "1.1.0" assert_success } @test "version_gt: 1.1.0 > 1.2.0 fails" { run version_gt "1.1.0" "1.2.0" assert_failure } @test "iso_timestamp: returns valid format" { run iso_timestamp assert_success assert_output --regexp '^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$' } @test "check_gum: respects APR_NO_GUM" { export APR_NO_GUM=1 run check_gum assert_failure } ``` -------------------------------- ### Basic TUI Application with Bubble Tea Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/go-tui.md A minimal Bubble Tea application demonstrating a selectable list. Requires Bubble Tea and Lip Gloss libraries. Run with `go mod init example && go get github.com/charmbracelet/bubbletea github.com/charmbracelet/lipgloss && go run .` ```go package main import ( "fmt" "os" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" ) var ( selected = lipgloss.NewStyle().Foreground(lipgloss.Color("212")).Bold(true) normal = lipgloss.NewStyle().Foreground(lipgloss.Color("252")) title = lipgloss.NewStyle().Bold(true).Padding(0, 1).Background(lipgloss.Color("62")) ) type model struct { items []string cursor int } func (m model) Init() tea.Cmd { return nil } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: switch msg.String() { case "q", "ctrl+c": return m, tea.Quit case "up", "k": if m.cursor > 0 { m.cursor-- } case "down", "j": if m.cursor < len(m.items)-1 { m.cursor++ } case "enter": fmt.Printf("\nYou chose: %s\n", m.items[m.cursor]) return m, tea.Quit } } return m, nil } func (m model) View() string { s := title.Render("Select an item") + "\n\n" for i, item := range m.items { cursor := " " style := normal if m.cursor == i { cursor = "▸ " style = selected } s += cursor + style.Render(item) + "\n" } s += "\n" + normal.Render("↑/↓: move • enter: select • q: quit") return s } func main() { m := model{items: []string{"Option A", "Option B", "Option C"}} if _, err := tea.NewProgram(m).Run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } ``` -------------------------------- ### Contributing - Development Setup with Cargo Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/crafting-readme-files/references/section-templates.md Details the commands for setting up the development environment using Cargo, including cloning the repository, building, testing, and linting. ```bash # Clone git clone https://github.com/user/repo.git cd repo # Install dependencies cargo build # Run tests cargo test # Run lints cargo clippy --all-targets -- -D warnings ``` -------------------------------- ### Comprehensive Quality Pipeline Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md A GitHub Actions workflow defining a multi-step quality pipeline for a Bun-based project. It includes steps for checkout, Bun setup, installation, linting, type checking, format checking, unit testing, and build verification with bundle size analysis. ```yaml jobs: quality: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup uses: oven-sh/setup-bun@v1 - name: Install run: bun install # Lint check - name: Lint run: bun run lint # Type check - name: Type check run: bun run typecheck # Format check - name: Format check run: bun run format:check # Unit tests - name: Unit tests run: bun run test # Build verification - name: Build run: bun run build # Bundle size check - name: Analyze bundle run: | bun run build du -sh dist/ # Fail if bundle exceeds threshold MAX_SIZE=$((1024 * 1024)) # 1MB ACTUAL_SIZE=$(du -sb dist/ | cut -f1) if [[ $ACTUAL_SIZE -gt $MAX_SIZE ]]; then echo "::error::Bundle size $ACTUAL_SIZE exceeds limit $MAX_SIZE" exit 1 fi ``` -------------------------------- ### Initialize Shell Integration Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Add MetaSkill CLI aliases, completions, and environment setup to your shell configuration file. Choose the command corresponding to your shell. ```bash # Initialize shell integration ms init bash >> ~/.bashrc # For bash ms init zsh >> ~/.zshrc # For zsh ms init fish >> ~/.config/fish/config.fish # For fish # Or use eval eval "$(ms init zsh)" ``` -------------------------------- ### Install Gum for Shell Scripts Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/SKILL.md Install the Gum CLI tool for adding prompts and spinners to shell scripts. This is a one-time installation. ```bash brew install gum # One-time install ``` -------------------------------- ### Force Fresh Build Start Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Initiates a new build session from scratch, discarding any existing checkpoints for the specified topic. Use this when a clean slate is required. ```bash # Force fresh start (discard checkpoint) ms build --fresh --topic "nextjs-patterns" ``` -------------------------------- ### Initialize and Configure Text Input Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Set up a new text input component, configure its placeholder, focus state, character limit, and display width. Includes examples for styling and password mode. ```go import "github.com/charmbracelet/bubbles/textinput" ti := textinput.New() ti.Placeholder = "Type here..." ti.Focus() ti.CharLimit = 156 ti.Width = 40 // Styling ti.PromptStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) ti.TextStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("255")) // Password mode ti.EchoMode = textinput.EchoPassword ti.EchoCharacter = '•' // In Update ti, cmd = ti.Update(msg) // Get value value := ti.Value() // Reset ti.SetValue("") ti.Reset() ``` -------------------------------- ### Install VHS Source: https://github.com/dicklesworthstone/meta_skill/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Command to install the VHS terminal recording tool using Homebrew. ```bash # Install brew install vhs ``` -------------------------------- ### Build Skill with MetaSkill and Track with Beads Viewer Source: https://github.com/dicklesworthstone/meta_skill/blob/main/PLAN_TO_MAKE_METASKILL_CLI.md Create a new skill using ms build and then track its progress by creating and closing a bead. This demonstrates the integration between skill development and task management. ```bash bd create --title "Create rust-async skill from CASS" --type task ``` ```bash ms build --name rust-async --from-cass "async rust patterns" ``` ```bash bd close beads-xyz --reason "Skill published" ``` -------------------------------- ### Install flamegraph Source: https://github.com/dicklesworthstone/meta_skill/blob/main/CONTRIBUTING.md Install the flamegraph tool using cargo. This is a prerequisite for performance profiling. ```bash cargo install flamegraph ```