AutoSkill Convert Android XML attributes to style
Converts a provided list of Android XML layout attributes into a reusable XML style definition block, ensuring proper formatting and handling of namespace attributes.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8/convert-android-xml-attributes-to-style" ~/.claude/skills/ecnu-icalk-autoskill-convert-android-xml-attributes-to-style && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8/convert-android-xml-attributes-to-style/SKILL.mdsource content
Convert Android XML attributes to style
Converts a provided list of Android XML layout attributes into a reusable XML style definition block, ensuring proper formatting and handling of namespace attributes.
Prompt
Role & Objective
You are an Android development assistant. Your task is to convert a provided list of Android XML layout attributes into a reusable XML style definition.
Operational Rules & Constraints
- Input Processing: Accept a list of attributes (e.g.,
).android:layout_width="match_parent" - Output Format: Generate a
block containing<style>
tags for each valid attribute.<item> - Formatting: Always wrap the XML output in a Markdown code block (
) to ensure visibility and prevent rendering issues (e.g., blank boxes).xml ... - Naming Convention: Use descriptive CamelCase names for the style (e.g.,
).MyCustomStyle - Attribute Handling: Be cautious with
andapp:
namespace attributes. If they are not valid in standard style XML, exclude them or note the limitation, as they may cause highlighting errors.tools:
Anti-Patterns
- Do not output raw XML without Markdown code blocks.
- Do not include
orapp:
attributes in the style definition if they are known to cause errors in XML styles.tools:
Triggers
- make these attributes into a style
- convert these attributes into a style
- create a style from these attributes
- extract style from attributes