markref
Locate shared features across languages using @mark source comments, retrieve bounded code context, and maintain useful navigation marks. Use for code navigation or requested source-label maintenance; fall back to rg when marks are absent.
소스 정보
- 저장소
- LIghtJUNction/markref
- 최근 소스 활동
- 2026년 10월 16일 02:02
- 감지된 SKILL.md 언어
- 영어
- 스타
- 1
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
파일 탐색기
2 개 파일SKILL.md 표시 중
SKILL.md
소스 지침 · 읽기 전용 미리보기- name
- markref
- description
- Locate shared features across languages using @mark source comments, retrieve bounded code context, and maintain useful navigation marks. Use for code navigation or requested source-label maintenance; fall back to rg when marks are absent.
- license
- AUL-1.0-draft.1; see LICENSE.txt in the markref distribution.
# markref
Use `markref` to reuse feature locations recorded beside source code. The CLI
is read-only; adding or changing comments is a separate source edit within the
user's requested scope. Do not add marks merely because this skill was loaded.
## Find and inspect
Check `markref --version` and use `markref --help` when flags are unfamiliar.
If the executable is missing, report that fact and use `rg`; install only when
installation is within the user's request. The registry install is
`cargo install markref --locked`.
Choose the intended Git worktree explicitly when cwd is ambiguous:
```sh
markref --root /path/to/project list
markref --root /path/to/project list --json
markref --root /path/to/project find "refund"
markref --root /path/to/project show payments.refund --json
markref --root /path/to/project context payments.refund --max-bytes 8000
markref --root /path/to/project context payments.refund --expand --max-bytes 8000
markref --root /path/to/project context payments.refund --json --max-bytes 8000
```
If the label is unknown, start with `list`: it returns sorted feature labels,
location counts and unique roles. It includes only scanned marks, not a list of
all implemented features. Then use a compact context map. Expand only the relevant feature, then read
its actual implementation, callers and tests. Byte limits are not token limits.
Use JSON context's `total_locations` count and `truncated` flag to distinguish a complete result from a
bounded excerpt; even a nontruncated result covers only scanned marks.
`find` searches mark metadata and adjacent comments, not every source line.
Summaries join up to eight adjacent comment lines, bounded to 180 characters;
blank lines separate blocks. Navigation commands warn on stderr if the scan
found diagnostics; JSON stdout remains machine-readable. Use `check --json`
to inspect the complete diagnostic list before treating results as complete.
No match exits nonzero; it does not prove the feature is absent. Fall back to
`rg --files` for paths and `rg -n` for errors, routes, config keys and symbols.
`--root` selects the containing Git worktree, not a subtree filter.
## Add or maintain marks when requested
Use the local language's real comment syntax. Keep one stable feature label
across components, with optional `role` and `contract`:
```rust
// Handles refunds against the original payment.
// @mark payments.refund role=authority
fn refund() {}
```
```python
# @mark payments.refund role=tool
def inspect_refund():
pass
```
```sql
-- @mark payments.refund role=schema
CREATE TABLE refund_receipts (id bigint PRIMARY KEY);
```
Place marks beside existing documentation and code. Labels use ASCII letters,
digits, underscores, hyphens and dots, without empty segments; each segment
starts with a letter or digit. Fields are whitespace-separated `key=value`
tokens without spaces in values. Only `role` and `contract` are supported in
the current version; aliases, summaries and explicit symbol fields are not
supported syntax.
Keep descriptions in adjacent ordinary comments instead.
Reuse labels freely: authority, caller, UI and tests can all share a feature.
Avoid tagging every helper. Shared labels express related functionality; shared
contracts express declared interfaces, not verified connections or successful
calls. Verify real protocol and business behavior separately.
After comment edits, run `markref --root /path/to/project check` and inspect the
target symbols. Standalone marks attach to following code within 24 lines;
inline marks attach to preceding code on the same line. Symbol detection and
the comment lexer are heuristic, so inspect suspicious bindings manually.
Do not rewrite unrelated source just to eliminate existing diagnostics.
## Scope and limitations
Default scans include only Git-tracked recognized source files. New unstaged
files need explicit `--include-untracked`; this flag still honors Git ignores.
Do not stage files merely to make a scan see them. Submodules and symlinks are
not followed; scan a submodule explicitly only when it is in scope. Binary,
oversized and unsupported files are skipped. `check --json` exposes diagnostics;
read warnings and errors instead of treating a zero exit as full coverage.
There is no persistent index, daemon or automatic source rewriting. Do not
invent `index`, `add`, `rename` or automatic call-graph commands.
GitHub에서 보기