with one click
refactor
Refactor pages, components, or queries for consistency
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Refactor pages, components, or queries for consistency
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Batch-generate web guide docs and i18n translations
Prepare a new release with build, verify, changelog, and git tag
Review changed code against AWSops project conventions
Synchronize project documentation with current code state
| name | refactor |
| description | Refactor pages, components, or queries for consistency |
| triggers | refactor, cleanup, improve |
์ผ๊ด์ฑ๊ณผ ์ฑ๋ฅ ํฅ์์ ์ํด ๊ธฐ์กด ํ์ด์ง, ์ปดํฌ๋ํธ ๋๋ ์ฟผ๋ฆฌ๋ฅผ ๋ฆฌํฉํ ๋งํฉ๋๋ค. (Refactor existing pages, components, or queries for consistency and performance.)
ํ์ด์ง์ ์ธ๋ผ์ธ ์์ธ ๋ ๋๋ง์ด ์์ผ๋ฉด ํ์ค ํจํด์ผ๋ก ์ถ์ถํฉ๋๋ค: (If a page has inline detail rendering, extract to the standard pattern:)
{(selected || detailLoading) && (
<div className="fixed inset-0 z-50 flex justify-end" onClick={() => setSelected(null)}>
<div className="absolute inset-0 bg-black/50" />
<div className="relative w-full max-w-2xl h-full bg-navy-800 border-l border-navy-600 overflow-y-auto shadow-2xl animate-fade-in"
onClick={(e) => e.stopPropagation()}>
{/* ํค๋ + ์ฝํ
์ธ + Section/Row ํฌํผ */}
{/* (Header + Content + Section/Row helpers) */}
</div>
</div>
)}
๋ชจ๋ ์ฟผ๋ฆฌ ํ์ผ์ ๋ค์์ export ํด์ผ ํฉ๋๋ค: (Every query file should export:)
summary โ StatsCard์ฉ ์ง๊ณ ์ (aggregated counts for StatsCards)list โ ๋ฉ์ธ ํ
์ด๋ธ ๋ฐ์ดํฐ, SCP ์ฐจ๋จ ์ปฌ๋ผ ์ ์ธ (main table data, avoid SCP-blocked columns)detail โ WHERE ์ ์ด ํฌํจ๋ ์ ์ฒด ๋ฆฌ์์ค ์์ธ (full resource details with WHERE clause)๋ชจ๋ ํ์ด์ง๋ ๋ค์ ํจํด์ ์ฌ์ฉํด์ผ ํฉ๋๋ค: (All pages should use:)
const fetchData = useCallback(async (bustCache = false) => {
setLoading(true);
try {
const res = await fetch(bustCache ? '/awsops/api/steampipe?bustCache=true' : '/awsops/api/steampipe', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ queries: { ... } }),
});
setData(await res.json());
} catch {} finally { setLoading(false); }
}, []);
npm run build ํต๊ณผ ํ์ธ (npm run build passes)bash scripts/11-verify.sh์์ ์๋ก์ด ์คํจ ์์ ํ์ธ (bash scripts/11-verify.sh shows no new failures)