lidge-jun/codexclaw / plugins/codexclaw/skills/repo-map
cxc-repo-map
VerifiedUse for repo structure and symbol maps. Triggers: repo map, codebase overview, architecture map, 와꾸.
scripts/importance.py
View on GitHub"""
Important file filtering for RepoMap.
"""
import os
from typing import List
IMPORTANT_FILENAMES = {
"README.md", "README.txt", "readme.md", "README.rst", "README",
"requirements.txt", "Pipfile", "pyproject.toml", "setup.py", "setup.cfg",
"package.json", "yarn.lock", "package-lock.json", "npm-shrinkwrap.json",
"Dockerfile", "docker-compose.yml", "docker-compose.yaml",
".gitignore", ".gitattributes", ".dockerignore",
"Makefile", "makefile", "CMakeLists.txt",
"LICENSE", "LICENSE.txt", "LICENSE.md", "COPYING",
"CHANGELOG.md", "CHANGELOG.txt", "HISTORY.md",
"CONTRIBUTING.md", "CODE_OF_CONDUCT.md",
".env", ".env.example", ".env.local",
"tox.ini", "pytest.ini", ".pytest.ini",
".flake8", ".pylintrc", "mypy.ini",
"go.mod", "go.sum", "Cargo.toml", "Cargo.lock",
"pom.xml", "build.gradle", "build.gradle.kts",
"composer.json", "composer.lock",
"Gemfile", "Gemfile.lock",
}
IMPORTANT_DIR_PATTERNS = {
os.path.normpath(".github/workflows"): lambda fname: fname.endswith((".yml", ".yaml")),
os.path.normpath(".github"): lambda fname: fname.endswith((".md", ".yml", ".yaml")),
os.path.normpath("docs"): lambda fname: fname.endswith((".md", ".rst", ".txt")),
}
def is_important(rel_file_path: str) -> bool:
"""Check if a file is considered important."""
normalized_path = os.path.normpath(rel_file_path)
file_name = os.path.basename(normalized_path)
dir_name = os.path.dirname(normalized_path)
# Check specific directory patterns
for important_dir, checker_func in IMPORTANT_DIR_PATTERNS.items():
if dir_name == important_dir and checker_func(file_name):
return True
# Check if the full normalized path is important
if normalized_path in IMPORTANT_FILENAMES:
return True
# Check if just the basename is important
if file_name in IMPORTANT_FILENAMES:
return True
return False
def filter_important_files(file_paths: List[str]) -> List[str]:
"""Filter list to only include important files."""
return [path for path in file_paths if is_important(path)]
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |