用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/oimiragieo/agent-studio --skill nativescript命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
Agent frontmatter enhancements — disallowedTools, mcpServers scoping, fork_eligible field
Context management — pre-compact persistence, threshold alignment, microcompact/circuit breaker detection
Hook enhancements — updatedInput for bash safety prefixes, suppressOutput for verbose blocks, denial-based routing feedback
正在显示 SKILL.md
| name | nativescript |
| version | 1.2.0 |
| category | Mobile |
| agents | ["developer","mobile-ux-reviewer","expo-mobile-developer"] |
| tags | ["nativescript","mobile","native","javascript","cross-platform"] |
| description | NativeScript best practices and patterns for mobile applications |
| model | sonnet |
| invoked_by | both |
| user_invocable |
| true |
| tools | ["Read","Write","Edit"] |
| globs | **/*.tsx, **/*.ts, **/*.vue, **/*.svelte, src/**/*.ts, app/**/*.ts, src/**/*.tsx, app/**/*.tsx, src/**/*.vue, app/**/*.vue, src/**/*.svelte |
| best_practices | ["Follow the guidelines consistently","Apply rules during code review","Use as reference when writing new code"] |
| error_handling | graceful |
| streaming | supported |
| verified | true |
| lastVerifiedAt | 2026-03-01T06:07:37.431Z |
| source | builtin |
| trust_score | 100 |
| provenance_sha | 79da4e50c9a67f60 |
.ios.ts, .android.ts) when code exceeds 20 platform-specific lines.custom-native/index.ios.ts, custom-native/index.android.ts, custom-native/common.ts, custom-native/index.d.ts to keep platform-specific code organized and easy to import with single import elsewhere, replacing custom-native with the name of the custom code.ios or android (e.g., iosButtonStyle).primaryButtonStyle, userProfileView).@NativeClass() when extending native classes when neededstatic ObjCProtocols = [AnyUIKitDelegate]; to declare custom delegates if a delegate is required or used.let delegate = MyCustomDelegate.new() as MyCustomDelegate, and ensure it is retained in the class scope.__ANDROID__ and __APPLE__ for conditional platform code with tree-shaking.setTimeout, setInterval) to avoid memory leaks."@nativescript/tailwind": "^2.1.0" for consistent styling paired with "tailwindcss": "~3.4.0".GridLayout or StackLayout for flexible, responsive layouts. Place more emphasis on proper GridLayout usage for complex layouts but use StackLayout for simpler, linear arrangements.visibility: 'hidden' for elements that should not affect layout when hidden.GridLayout wisely to setup complex layouts.ns clean) after modifying files in App_Resources or package.json.itemTemplateSelector) for conditional layouts in ListView and RadListView.Observable or ObservableArray properties to reflect state changes efficiently..ios.ts, .android.ts) when platform code exceeds 20 lines — mixing platform branches in a single file prevents code-splitting and forces all native APIs to load on both platforms.| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Mixing platform branches in a single file | Cannot code-split by platform; all native APIs loaded on both platforms | Use .ios.ts and .android.ts files when platform-specific code exceeds 20 lines |
| Direct visual tree manipulation at runtime | Bypasses rendering pipeline; causes race conditions and layout flicker | Use data-binding and reactive state to drive layout updates |
| Unreferenced delegate instances | iOS GC collects them mid-execution; silent callback failures | Always retain delegates in class scope: this.delegate = MyDelegate.new() |
| Deeply nested layout containers | Each level adds layout passes; janky scrolling on mid-range devices | Use GridLayout for complex layouts; StackLayout only for simple linear arrangements |
| Leaking timers and event listeners | NativeScript does not GC native references; leaks accumulate across navigation | Always cancel timers and remove listeners in component teardown lifecycle |
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.