Mako Code Intel
Use this skill for static code queries that are best answered by syntax-aware
search or diagnostics. It is not the general repo-orientation skill; use
repo_map through /mako-ai:mako-discovery for that.
Tools
ast_find_pattern
Use for structural code pattern search over indexed TypeScript, TSX, JavaScript, and JSX files.
- Best for finding syntax shapes that text search may miss.
- Use for patterns such as function calls, JSX attributes, hook usage, imports, conditionals, or unsafe constructs.
- Keep searches bounded with focused patterns and file scopes when possible.
- TSX/JSX snippets starting with
{,[, or<also run with parser context, so callers usually do not need to wrap lone object or JSX patterns. CheckpatternAttemptsand matchpatternVariantwhen you need to know whether the original or auto-anchored form matched. - List metavariables in
captureswhen you need captured values returned. - If the result is a false positive that should not recur, use
finding_ackfrom/mako-ai:mako-workflowwith the returnedackableFingerprint.
lint_files
Use for focused lint/static diagnostics against selected files.
- Best after editing files or when reviewing a known suspect area.
- Defaults to compact output; pass
verbosity: "full"ormaxFindingswhen broad diagnostics are actually needed. - YAML rule packs under
.mako/ruleshot-reload in long-running MCP sessions. - For helper-bypass checks, rule packs may declare
canonicalHelperwith a helpersymboland optionalpath; matching files that already reference the helper are suppressed, while bypasses emit producer/consumer context. - Use the returned finding identity/fingerprint when acknowledging reviewed diagnostics.
- Do not use
agent_feedbackto suppress a diagnostic; usefinding_ack.
extract_rule_template
Use after a fix lands and the removed shape should become future project knowledge.
- Pass the local git
fixCommit; optionally passbaseCommit,filePath, andruleIdPrefix. - Treat the returned
draftYamlas a draft. Review broad patterns and caveats before placing it under.mako/rules. - Follow with
rule_pack_validateand a focusedlint_filesrun before relying on the new rule.
Feedback Logging
Log agent_feedback when a tool run here was notably useful, partial,
noisy, stale, wrong, or wasted the turn. Skip routine calls.
Required procedure (see /mako-ai:mako-guide for full rules and
reason-code vocabulary):
- Call
recall_tool_runsto get the prior run'srequestId. Do not fabricate one — if no run is recalled, skip feedback. - Call
agent_feedbackwithreferencedToolName,referencedRequestId,grade: "full" | "partial" | "no",reasonCodesfrom the starter vocabulary in/mako-ai:mako-guide, and a shortreason.
For individual false-positive or reviewed-accepted static findings from
ast_find_pattern or lint_files, use finding_ack with the returned
ackableFingerprint (ast) or identity.matchBasedId (lint) — never
agent_feedback to suppress static findings. Rate the tool run's
usefulness with agent_feedback; mark individual findings with
finding_ack. See /mako-ai:mako-workflow for finding_ack usage.
See Also
- Use
/mako-ai:mako-discoveryfor repo orientation and broad cross-surface search. - Use
/mako-ai:mako-graphfor import impact, cycles, hotspots, and symbols. - Use
/mako-ai:mako-workflowforfinding_ackand finding ack reports.