agentleFS
NeuroAIHubNeuroAIHub/awesome_cognitive_and_neuroscience_skills/skills/share-usage/SKILL.md

share-usage

Skill39 starsChanged 9 months agoMITView on GitHub

Generate and share anonymized skill usage statistics to help the community understand which skills are most valuable

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. About 0 are common, 20 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈20

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when you want to:

    line 14
  2. Distinctive:

    Before generating the report, you should understand exactly what will be shared:

    line 22
  3. Distinctive:

    Your identity: - No usernames, emails, or identifying information

    line 34
  4. Distinctive:

    Project details: - No file paths, code, or project names

    line 35
  5. Distinctive:

    Conversation content: - No actual research questions or discussions

    line 36
  6. Distinctive:

    Timestamps: - Only aggregated date ranges, not specific times

    line 37
  7. Distinctive:

    System information: - No machine names, IPs, or system details

    line 38
  8. Distinctive:

    Other tools: - Only skills from this repository are counted

    line 39
  9. Distinctive:

    No personally identifiable information, project details, or conversation content is included.

    line 48
  10. Distinctive:

    When the user invokes this skill (e.g., "share my skill usage" or "generate usage report"), follow these steps:

    line 52
  11. Distinctive:

    Wait for user confirmation before proceeding.

    line 77
  12. Distinctive:

    When this skill is invoked, follow these steps:

    line 83
  13. Distinctive:

    Create a Python script inline to analyze logs:

    line 87
  14. Distinctive:

    Use the AskUserQuestion tool to gather optional information:

    line 168
  15. Distinctive:

    If user chose "Yes" for comments, ask them to provide their comments in a follow-up message.

    line 195
  16. Distinctive:

    Create the markdown report with this exact format:

    line 201
  17. Very specific:

    Before offering to share, check if gh CLI is available:

    line 233
  18. Very specific:

    If gh is not installed or not authenticated, inform the user:

    line 239
  19. Very specific:

    If "Share to GitHub Discussions" (and gh is available):

    line 251
  20. Distinctive:

    If "Save locally only":

    line 303
  21. Distinctive:

    If "Just preview, don't save":

    line 310
  22. Distinctive:

    Repository-Specific: Only skills from this repository are counted (excludes superpowers, scientific-writer, etc.).

    line 393
  23. Distinctive:

    No Sensitive Data: No personal information, project details, or conversation content is included.

    line 395

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Share Skill Usage Statistics

This skill helps you generate and share anonymized statistics about your skill usage with the community. This helps maintainers understand which skills are most valuable and guides future development.

When to Use

Use this skill when you want to:

  • Share your experience with the skill repository
  • Help the community understand which skills are most useful
  • Contribute usage data to improve skill development priorities
  • Celebrate your research productivity with the community

What Information Will Be Shared

Before generating the report, you should understand exactly what will be shared:

✅ Information That WILL Be Shared

  1. Skill usage counts - How many times you used each skill
  2. Skill names - Which skills from this repository you used
  3. Time period - The date range of your usage data
  4. General statistics - Total skill calls, unique skills used
  5. Optional context - Your research domain (if you choose to provide it)

❌ Information That Will NOT Be Shared

  1. Your identity - No usernames, emails, or identifying information
  2. Project details - No file paths, code, or project names
  3. Conversation content - No actual research questions or discussions
  4. Timestamps - Only aggregated date ranges, not specific times
  5. System information - No machine names, IPs, or system details
  6. Other tools - Only skills from this repository are counted

Privacy Notice

This skill generates a completely anonymized report. The report contains ONLY:

  • Skill names and usage counts
  • Date range (e.g., "Last 30 days")
  • Optional research domain tag (e.g., "fMRI analysis", "EEG research")

No personally identifiable information, project details, or conversation content is included.

How to Use

When the user invokes this skill (e.g., "share my skill usage" or "generate usage report"), follow these steps:

Step 1: Confirm Privacy Understanding

First, present the privacy information to the user and confirm they understand:

Say to the user:

"I'll generate an anonymized report of your skill usage from this repository. The report will include:

✅ What WILL be included:

  • Skill names and usage counts
  • Date range (e.g., "2024-01-01 to 2024-03-01")
  • Optional research domain tag (if you provide it)
  • Optional comments (if you provide them)

❌ What will NOT be included:

  • Your identity (no usernames, emails, names)
  • Project details (no file paths, code, project names)
  • Conversation content (no research questions or discussions)
  • Specific timestamps (only date ranges)
  • System information (no machine names, IPs)
  • Skills from other repositories

The report is completely anonymized and sharing is optional. Shall I proceed?"

Wait for user confirmation before proceeding.

Step 2: Analyze Claude Code Logs

Implementation Steps

When this skill is invoked, follow these steps:

Step 1: Analyze Claude Code Logs

Create a Python script inline to analyze logs:

import json
import re
from pathlib import Path
from collections import Counter
from datetime import datetime

def analyze_usage(claude_dir="~/.claude", days=None):
    """Extract skill usage from Claude Code logs."""
    claude_dir = Path(claude_dir).expanduser()

    all_skills = []
    all_timestamps = []

    # Parse history.jsonl
    history_path = claude_dir / "history.jsonl"
    if history_path.exists():
        with open(history_path, 'r', encoding='utf-8', errors='ignore') as f:
            for line in f:
                if '"name":"Skill"' in line or '"name": "Skill"' in line:
                    match = re.search(r'"skill":\s*"([^"]+)"', line)
                    if match:
                        skill_name = match.group(1)
                        # Only count skills from this repository
                        if skill_name.startswith('awesome-cognitive-and-neuroscience-skills:'):
                            clean_name = skill_name.replace('awesome-cognitive-and-neuroscience-skills:', '')
                            all_skills.append(clean_name)

                # Extract timestamp
                timestamp_match = re.search(r'"timestamp":(\d+)', line)
                if timestamp_match:
                    ts = int(timestamp_match.group(1)) / 1000
                    all_timestamps.append(datetime.fromtimestamp(ts))

    # Parse debug files
    debug_dir = claude_dir / "debug"
    if debug_dir.exists():
        for debug_file in debug_dir.glob("*.txt"):
            if days:
                file_age = (datetime.now().timestamp() - debug_file.stat().st_mtime) / 86400
                if file_age > days:
                    continue

            with open(debug_file, 'r', encoding='utf-8', errors='ignore') as f:
                content = f.read()
                matches = re.finditer(r'"name":\s*"Skill".*?"skill":\s*"([^"]+)"', content, re.DOTALL)
                for match in matches:
                    skill_name = match.group(1)
                    if skill_name.startswith('awesome-cognitive-and-neuroscience-skills:'):
                        clean_name = skill_name.replace('awesome-cognitive-and-neuroscience-skills:', '')
                        all_skills.append(clean_name)

    if not all_skills:
        return None

    # Calculate statistics
    skill_counts = Counter(all_skills)

    if all_timestamps:
        min_date = min(all_timestamps)
        max_date = max(all_timestamps)
        date_range = f"{min_date.strftime('%Y-%m-%d')} to {max_date.strftime('%Y-%m-%d')}"
        days_span = (max_date - min_date).days
    else:
        date_range = "Unknown"
        days_span = None

    return {
        'skills': skill_counts,
        'total_calls': len(all_skills),
        'unique_skills': len(skill_counts),
        'date_range': date_range,
        'days_span': days_span,
        'most_used': skill_counts.most_common(1)[0] if skill_counts else None
    }

Step 3: Ask User for Optional Information

Use the AskUserQuestion tool to gather optional information:

Question 1: Research Domain

  • Header: "Domain"
  • Question: "What research domain do you work in? (This helps others find relevant skills)"
  • Options:
    • "fMRI analysis"
    • "EEG/MEG research"
    • "Cognitive modeling"
    • "Behavioral experiments"
    • "Other (specify in notes)"

Question 2: Comments

  • Header: "Experience"
  • Question: "Would you like to add comments about your experience with these skills?"
  • Options:
    • "Yes, I'll add comments"
    • "No comments"

Question 3: Sharing Preference

  • Header: "Action"
  • Question: "What would you like to do with the report?"
  • Options:
    • "Share to GitHub Discussions (Recommended)"
    • "Save locally only"
    • "Just preview, don't save"

If user chose "Yes" for comments, ask them to provide their comments in a follow-up message.

Step 4: Generate Report

Step 4: Generate Report

Create the markdown report with this exact format:

# Skill Usage Report

**Time Period**: [date_range] ([days_span] days)
**Research Domain**: [user_provided or "Not specified"]

## Summary
- Total skill calls: [total_calls]
- Unique skills used: [unique_skills]
- Most used skill: [skill_name] ([count] times)

## Top 10 Skills
1. [skill]: [count] uses
2. [skill]: [count] uses
...

## All Skills Used
- [skill]: [count]
- [skill]: [count]
...

## User Comments
[user_comments or "No comments provided"]

---
*This report was generated using the `share-usage` skill. All data is anonymized.*

Step 5: Check GitHub CLI Prerequisites

Before offering to share, check if gh CLI is available:

gh auth status

If gh is not installed or not authenticated, inform the user:

To share usage reports directly, you need the GitHub CLI. Install it from https://cli.github.com/ and run gh auth login. I can save the report locally for you to post manually, or you can set up gh and run this skill again.

Step 6: Save and Present

  1. Save the report to the current working directory as skill-usage-report-[YYYYMMDD].md
  2. Display the report to the user in full
  3. Provide next steps based on user's preference:

    • If "Share to GitHub Discussions" (and gh is available):

      Get repository and category IDs:

      gh api graphql -f query='
      {
        repository(owner: "HaoxuanLiTHUAI", name: "awesome_cognitive_and_neuroscience_skills") {
          id
          discussionCategories(first: 10) {
            nodes {
              id
              name
            }
          }
        }
      }'

      Create the discussion:

      gh api graphql -f query='
      mutation {
        createDiscussion(input: {
          repositoryId: "REPO_ID",
          categoryId: "SHOW_AND_TELL_CATEGORY_ID",
          title: "Skill Usage Report - [Research Domain]",
          body: "REPORT_CONTENT_HERE"
        }) {
          discussion {
            url
          }
        }
      }'

      On success:

      ✅ Report saved to: skill-usage-report-[date].md
      🎉 Shared to GitHub Discussions: [URL]
      
      Thank you for contributing to the community!

      On failure:

      ✅ Report saved to: skill-usage-report-[date].md
      ❌ Failed to post to GitHub Discussions
      
      You can manually share at:
      https://github.com/HaoxuanLiTHUAI/awesome_cognitive_and_neuroscience_skills/discussions/new?category=show-and-tell
    • If "Save locally only":
      ✅ Report saved to: skill-usage-report-[date].md
      
      Your report is saved locally. Sharing is completely optional - you can share it later if you'd like!
    • If "Just preview, don't save":
      📊 Here's your usage report (not saved):
      
      [Display report]
      
      If you'd like to save or share this later, just run this skill again!

Step 7: Handle Edge Cases

If no skill usage found:

❌ No skill usage found from this repository.

This could mean:
- You haven't used any skills from awesome-cognitive-and-neuroscience-skills yet
- The Claude Code logs don't contain skill usage data
- The log format may have changed

Try using some skills first, then run this report again!

If Claude directory not found:

❌ Could not find Claude Code directory at ~/.claude/

Please check your Claude Code installation or specify a different directory.

Example Report

Here's what a typical usage report looks like:

# Skill Usage Report

**Time Period**: 2024-01-15 to 2024-03-03 (48 days)
**Research Domain**: fMRI analysis

## Summary
- Total skill calls: 47
- Unique skills used: 12
- Most used skill: fmri-glm-analysis-guide (15 times)

## Top 10 Skills
1. fmri-glm-analysis-guide: 15 uses
2. fmri-preprocessing-pipeline-guide: 8 uses
3. cogsci-statistics: 6 uses
4. neuroimaging-power-guide: 4 uses
5. fmri-task-design-guide: 3 uses
6. cogsci-visualization: 3 uses
7. research-literacy: 2 uses
8. cognitive-paradigm-design: 2 uses
9. brain-connectivity-modeler: 2 uses
10. contribute-skill: 1 use

## All Skills Used
- brain-connectivity-modeler: 2
- cognitive-paradigm-design: 2
- cogsci-statistics: 6
- cogsci-visualization: 3
- contribute-skill: 1
- fmri-glm-analysis-guide: 15
- fmri-preprocessing-pipeline-guide: 8
- fmri-task-design-guide: 3
- neuroimaging-power-guide: 4
- paper-to-skill: 1
- research-literacy: 2
- verify-skill: 1

## User Comments
These skills have been incredibly helpful for my fMRI analysis pipeline. The GLM analysis guide saved me hours of debugging by helping me understand proper contrast specification. The preprocessing guide helped me make informed decisions about motion correction parameters.

---
*This report was generated using the `share-usage` skill. All data is anonymized.*

Important Notes

  • Privacy First: This skill respects user privacy completely. All data is anonymized.
  • Review Before Sharing: Users can review and edit the report before sharing.
  • Sharing is Optional: Sharing is completely voluntary - users can keep reports private.
  • Repository-Specific: Only skills from this repository are counted (excludes superpowers, scientific-writer, etc.).
  • Community Value: Reports help maintainers prioritize skill development and help others discover useful skills.
  • No Sensitive Data: No personal information, project details, or conversation content is included.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.