원클릭으로
trail-sense-scaffold-quick-action
Scaffold a Trail Sense quick action with class, persisted Tools id, registration, string, and icon resources.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold a Trail Sense quick action with class, persisted Tools id, registration, string, and icon resources.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Audit changed Android translations in a GitHub PR.
Add Trail Sense UI automation tests using AutomationLibrary and ToolTestBase for tool workflows or androidTests.
Add Trail Sense Room persistence for a model, including entity mapping, DAO, repository, AppDatabase migration, and tool registration.
SOC 직업 분류 기준
| name | trail-sense-scaffold-quick-action |
| description | Scaffold a Trail Sense quick action with class, persisted Tools id, registration, string, and icon resources. |
Add a quick action following Trail Sense conventions.
Tools.<TOOL_ID>, tool registration file, icon drawable, display string, and desired click/long-click behavior. This step is complete when every placeholder in the class and registration snippets below has a concrete value.Tools.QUICK_ACTION_* id is known.app/src/main/java/com/kylecorry/trail_sense/tools/<tool_package>/quickactions/QuickAction<Name>.kt
Tools.QUICK_ACTION_<NAME> constant at the end of Tools.kt, using the next available integer. This step is complete when the new id is greater than existing quick-action ids and no existing id changed.<ToolName>ToolRegistration.kt with ToolQuickAction. This step is complete when the registration references the new id, display string, and quick action constructor.Use this template for what the new quick action scaffold should look like:
package com.kylecorry.trail_sense.tools.<tool_package>.quickactions
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.shared.QuickActionButton
import com.kylecorry.trail_sense.shared.navigateWithAnimation
import com.kylecorry.trail_sense.shared.openTool
import com.kylecorry.trail_sense.shared.quickactions.QuickActionButtonView
import com.kylecorry.trail_sense.tools.tools.infrastructure.Tools
class QuickAction<Name>(btn: QuickActionButtonView, fragment: Fragment) :
QuickActionButton(btn, fragment) {
override fun onCreate() {
super.onCreate()
setIcon(R.drawable.<icon>)
}
override fun onClick() {
super.onClick()
// Do nothing right now
}
override fun onLongClick(): Boolean {
super.onLongClick()
fragment.findNavController().openTool(Tools.<TOOL_ID>)
return true
}
}
Fill in the placeholders, but don't add any logic.
In the owning <ToolName>ToolRegistration.kt:
import com.kylecorry.trail_sense.tools.<tool_package>.quickactions.QuickAction<Name>
import com.kylecorry.trail_sense.tools.tools.infrastructure.ToolQuickAction
Add or extend quickActions in the Tool(...) constructor:
quickActions = listOf(
ToolQuickAction(
Tools.QUICK_ACTION_<NAME>,
context.getString(R.string.<display_string>),
::QuickAction<Name>
)
),
Add the new constant near the other quick-action constants:
const val QUICK_ACTION_<NAME> = <next_available_int>
Do not renumber existing ids. Quick-action ids are persisted in user preferences.