Dianel555/DSkills / skills/ace-tool
ace-tool
VerifiedSemantic codebase search, code indexing, and prompt enhancement via standalone CLI. Use when: (1) Semantic code search with natural language queries, (2) Code indexing for remote codebase retrieval, (3) Prompt enhancement with codebase context, (4) Before grep/find/glob operations for better accuracy, (5) Complex requirements clarification, (6) Large codebase navigation. Triggers: "search context", "enhance prompt", "find code that", "index project", "clarify requirements". IMPORTANT: Always use ace-tool BEFORE grep/find/glob for semantic-level code location.
scripts/templates.py
View on GitHub"""Prompt templates and constants for ACE-Tool CLI."""
USER_AGENT = "augment.cli/0.29.0"
DEFAULT_MODEL = "claude-sonnet-4-5"
# Default models for third-party APIs
DEFAULT_CLAUDE_MODEL = "sonnet-4-6-20250929"
DEFAULT_OPENAI_MODEL = "gpt-5.4"
DEFAULT_CODEX_MODEL = "gpt-5.4"
DEFAULT_GEMINI_MODEL = "gemini-3-flash-preview"
# Environment variable names
ENV_ENHANCER_ENDPOINT = "PROMPT_ENHANCER_ENDPOINT"
ENV_ENHANCER_ENDPOINT_LEGACY = "ACE_ENHANCER_ENDPOINT"
ENV_ENHANCER_INCLUDE_SEARCH_CONTEXT = "PROMPT_ENHANCER_INCLUDE_SEARCH_CONTEXT"
ENV_ENHANCER_REASONING_EFFORT = "PROMPT_ENHANCER_REASONING_EFFORT"
# Search context injection
SEARCH_CONTEXT_CHAR_LIMIT = 12000
NO_RELEVANT_CODE_CONTEXT = "No relevant code context found for your query."
ENHANCE_PROMPT_TEMPLATE = """⚠️ NO TOOLS ALLOWED ⚠️
Here is an instruction that I'd like to give you, but it needs to be improved. Rewrite and enhance this instruction to make it clearer, more specific, less ambiguous, and correct any mistakes. Do not use any tools: reply immediately with your answer, even if you're not sure. Consider the context of our conversation history when enhancing the prompt. If there is code in triple backticks (```) consider whether it is a code sample and should remain unchanged.Reply with the following format:
### BEGIN RESPONSE ###
Here is an enhanced version of the original instruction that is more specific and clear:
<augment-enhanced-prompt>enhanced prompt goes here</augment-enhanced-prompt>
### END RESPONSE ###
Here is my original instruction:
{original_prompt}"""
ITERATIVE_ENHANCE_TEMPLATE = """⚠️ NO TOOLS ALLOWED ⚠️
You are performing an ITERATIVE ENHANCEMENT on an already-enhanced prompt. The user has reviewed and possibly edited the previous enhancement. Your task is to further refine and optimize while PRESERVING the user's modifications and intent.
**Context:**
- Original prompt: {original_prompt}
- Previous enhancement: {previous_enhanced}
- Current version (user may have edited): {current_prompt}
**Instructions:**
1. Identify what the user changed from the previous enhancement (their edits reflect their intent)
2. PRESERVE the user's modifications - do not revert their changes
3. Further optimize clarity, specificity, and correctness
4. If the user made no changes, provide alternative improvements or deeper refinement
5. Do not use any tools: reply immediately
Reply with the following format:
### BEGIN RESPONSE ###
<augment-enhanced-prompt>iteratively enhanced prompt goes here</augment-enhanced-prompt>
### END RESPONSE ###"""
TEXT_EXTENSIONS = {
".py",
".js",
".ts",
".jsx",
".tsx",
".mjs",
".cjs",
".java",
".go",
".rs",
".cpp",
".c",
".cc",
".h",
".hpp",
".hxx",
".cs",
".rb",
".php",
".swift",
".kt",
".kts",
".scala",
".clj",
".cljs",
".lua",
".dart",
".m",
".mm",
".pl",
".pm",
".r",
".R",
".jl",
".ex",
".exs",
".erl",
".hs",
".zig",
".v",
".nim",
".f90",
".f95",
".groovy",
".gradle",
".sol",
".move",
".md",
".mdx",
".txt",
".json",
".jsonc",
".json5",
".yaml",
".yml",
".toml",
".xml",
".ini",
".conf",
".cfg",
".properties",
".html",
".htm",
".css",
".scss",
".sass",
".less",
".styl",
".vue",
".svelte",
".astro",
".ejs",
".hbs",
".pug",
".jade",
".jinja",
".jinja2",
".erb",
".sql",
".sh",
".bash",
".zsh",
".fish",
".ps1",
".bat",
".cmd",
".graphql",
".gql",
".proto",
".prisma",
}
EXCLUDE_PATTERNS = {
".venv",
"venv",
".env",
"env",
"node_modules",
"vendor",
".pnpm",
".yarn",
"bower_components",
".git",
".svn",
".hg",
"__pycache__",
".pytest_cache",
".mypy_cache",
".tox",
".ruff_cache",
"dist",
"build",
"target",
"out",
"bin",
"obj",
".next",
".nuxt",
".output",
".vercel",
".netlify",
".turbo",
".parcel-cache",
".cache",
".temp",
".tmp",
"coverage",
".nyc_output",
"htmlcov",
".idea",
".vscode",
".vs",
".ace-tool",
}
# Indexing
MAX_BLOB_SIZE = 128 * 1024 # 128KB
MAX_BATCH_SIZE = 1 * 1024 * 1024 # 1MB
UPLOAD_BATCH_COUNT = 30
RETRIEVAL_TIMEOUT = 120.0
INDEX_DIR = ".ace-tool"
INDEX_FILE = "index.json.gz"
ENCODING_CHAIN = ["utf-8", "gbk", "gb18030", "cp1252"]
BINARY_EXTENSIONS = {
".png",
".jpg",
".jpeg",
".gif",
".bmp",
".ico",
".svg",
".webp",
".mp3",
".mp4",
".avi",
".mov",
".wav",
".ogg",
".flv",
".zip",
".tar",
".gz",
".bz2",
".7z",
".rar",
".xz",
".exe",
".dll",
".so",
".dylib",
".o",
".a",
".lib",
".pdf",
".doc",
".docx",
".xls",
".xlsx",
".ppt",
".pptx",
".woff",
".woff2",
".ttf",
".otf",
".eot",
".pyc",
".pyo",
".class",
".jar",
".db",
".sqlite",
".sqlite3",
".bin",
".dat",
".pak",
".bundle",
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |