code-context-finder
コードのコンテキストと依存関係を見つける
متاح أيضًا من: Joseph OBrien
開発者は、馴染みのないコードで作業したり変更を加えたりする際に、しばしばコンテキストを失います。このスキルは、コンテキストが役立つタイミングを自動的に検出し、関連するナレッジグラフエントリ、コードの関係性、依存関係、テストを表示します。
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "code-context-finder". Find context for the auth_service module
النتيجة المتوقعة:
- Knowledge Graph: 3 entities found (auth_decision, user_session, security_pattern)
- Imported By: 5 files (auth_handler.py:15, login_view.py:8, etc.)
- Tests: test_auth_service.py (12 tests), integration_auth_test.py (3 tests)
- Related Decision: Use JWT for session tokens (ADR-2024-001)
استخدام "code-context-finder". What files depend on the user model
النتيجة المتوقعة:
- Direct dependents: 8 files (user_api.py:42, profile_service.py:15, etc.)
- Indirect impact: 3 more files through transitive dependencies
- Tests: test_user_model.py, test_user_api.py, integration_user_test.py
استخدام "code-context-finder". Find all callers of the process_payment function
النتيجة المتوقعة:
- Function callers: 4 locations
- checkout_handler.py:23 - calls in payment flow
- order_service.py:89 - called for order completion
- Test coverage: test_payment.py has 5 tests covering this function
التدقيق الأمني
آمنThis skill is a documentation-based prompt system with a local Python analysis script. The static scanner flagged 139 issues, but all are false positives stemming from pattern matching on documentation examples. The Python script (scripts/find-code-relationships.py) uses safe pathlib and regex operations for file analysis, with no subprocess calls, network access, or credential handling. The markdown reference files contain grep command examples (documentation, not code). The critical heuristic flagging 'Code execution + Network + Credential access' is incorrect as none of these capabilities exist in the actual code.
عوامل الخطر
⚡ يحتوي على سكربتات (1)
📁 الوصول إلى نظام الملفات (1)
درجة الجودة
ماذا يمكنك بناءه
コンテキスト付きオンボーディング
変更を加える前に、関連するエンティティ、決定、依存関係を確認することで、馴染みのないコードを理解します。
安全なリファクタリング
共有モジュールを変更する前にすべての呼び出し元と依存先を見つけ、下流のコードの破損を回避します。
エラー調査
ナレッジグラフとコードの関係性を使用して、関連コンポーネント全体でエラーパターンを追跡します。
جرّب هذه الموجهات
Find context for the file I am working on. Check the knowledge graph for related entities and find all files that import this module.
Show me all callers, dependents, and tests for [module_name]. What will break if I change this?
Search the knowledge graph for similar errors or past issues. Find the code path to the affected component.
Find all architectural decisions related to [feature]. What patterns were established and why?
أفضل الممارسات
- 共有モジュールやコアモジュールを変更する前にコンテキストチェックを実行する
- アーキテクチャの決定を行う際にナレッジグラフを更新する
- リファクタリング前にテストカバレッジを確認して安全性を確保する
تجنب
- 依存ファイルを先に確認せずに変更を加える
- ナレッジグラフに記録されている過去のアーキテクチャ決定を無視する
- テストカバレッジの存在を確認せずにコードを変更する