Use when chatting in terminal, especially in terminal-first technical or business discussions, to ensure responses are terminal-friendly and visually structured.
Output replies using terminal-friendly formatting: strong visual boundaries, vivid, concise, short sentences, clear structure, and prominent key points. The goal is to enable both technical and business readers to understand quickly and take action.
Core Principle: Use strong visual boundaries (headers, separators) to organize content.
💡 When system-level or developer-level rules conflict with this Skill, the higher-priority rules shall prevail.
Execute in the following order:
The following rules have higher priority than all other specifications in this Skill and must not be violated under any circumstances:
Prioritize Code Display, Use Path References Sparingly —— When providing analysis or modifications, the primary principle is to directly paste (or show as a Diff) core code snippets so that users do not need to look up original documents! Do not deliberately output only line numbers without code just to be "compliant."
src/main/... completely destroys terminal readability and is the most serious formatting violation.UserService.kt:L35-L68OrderService#createOrder():L20-L90src/main/kotlin/com/example/app/service/UserService.kt:35com.example.app.service.UserServiceProhibit Markdown Table Syntax —— Terminals cannot render | xxx | yyy |. Always use ASCII tables with +---+ borders.
*italics* to emphasize critical information.> syntax to create a "visual frame" for auxiliary information. When encountering Tips (💡), Warnings (⚠️), Core Summaries (📌), or side notes (📝), always use > to separate them from the main text for better visibility.# / ## / ### in terminal dialogues. Universally use **Bold Text** (can be paired with Emoji) for group headers. Headers should occupy their own line with necessary whitespace.**1️⃣ Header Content** or **1) Header Content** bold numbering format instead of ## 1) Header. Keep the visual hierarchy flat.1. 2. 3. or 1️⃣ 2️⃣ 3️⃣) for multi-step tasks to guide the eye.📌 TL;DR Specification: For longer explanations, you must provide a TL;DR summary at the beginning so readers can grasp the core value within 3 seconds. TL;DR must be wrapped in a
>quote block, paired with a 📌 or 🎯 icon, to visually separate it from the main text. After the TL;DR block ends, you must leave one empty line before the main text to ensure a clear visual gap.Format Example:
> 🎯 **TL;DR** > The core issue is xxx, and it's recommended to adopt the yyy solution. (One empty line before the body text) Below is the detailed breakdown...
⚠️ This section is a detailed expansion of "CRITICAL RULE #1." Core constraints are at the top of the document. 📌 Core Principle: Show the original code if possible; staying only with line numbers is always a last-resort bottom-line measure. Do not just verbally describe code logic—code is the evidence.
Source Code Positioning Three-Tier Strategy (Strictly Descending Priority):
🥇 Tier 1: Short Code (≤10 lines) → Paste original snippet directly (Best Choice) Embed the core code directly in the dialogue without needing line numbers. Let the reader see for themselves and verify/judge without needing to jump.
✅ Correct Example (Short code → Paste directly):
The permission interceptor only allows logged-in users: if (token == null || !tokenStore.isValid(token)) { throw UnauthorizedException("Token is invalid or expired") } Unauthenticated requests are intercepted here and won't enter business logic. (See AuthInterceptor.kt:L40)
🥈 Tier 2: Long Code (>10 lines) → Excerpt core segments + Ellipses bridge
Don't retreat to pure line numbers just because the code is long. Show only core logic fragments and use // ... to mark omitted parts.
✅ Correct Example (Long code → Excerpt core + Ellipses):
Amount ceiling logic (OrderService#calcTotalAmount): // ... iterate and accumulate subtotal ... if (total > MAX_AMOUNT) { log.warn("Exceeded limit, truncating") total = MAX_AMOUNT } return total Parts exceeding MAX_AMOUNT will be silently truncated, which is transparent to the caller.
🥉 Tier 3: Extremely long file, cannot be excerpted → Downgrade to precise path/line reference Only when the first two tiers cannot satisfy the need (e.g., just mentioning the existence of a file category or summarizing its role) can you downgrade to path references. Forcefully giving only line numbers or purely verbal descriptions of details is a serious violation. Even then, be precise down to "a specific segment of a specific method."
❌ Incorrect Example (Source available but only giving line numbers or verbal description):
The interceptor validates the token at AuthInterceptor.kt:L40-55 and throws UnauthorizedException if it fails. OR: The interceptor checks if the token is null and throws an exception when invalid...
+ / - Diff format for core content modification suggestions for easy identification of changes.(See UserService.kt:L35).⚠️ Hard Constraint: When you must output a path, any path including directory prefixes (such as
src/,com/,main/java/) is a fatal violation. Regardless of whether the path appears inline, in a list item, or on its own line, it must be abbreviated to the short name.
Allowed Formats (Three and only three):
+----------------------+--------------------+-------------------------------------------+
| Format | Usage | Example |
+----------------------+--------------------+-------------------------------------------+
| FileName.ext:Lline | General reference | TrainFacade.kt:L335 |
| FileName.ext:Lstart-Lend | Range reference | TrainFacade.kt:L335-L356 |
| File#method():Lline | Method-level pos | TrainFacade#calcCurProgress():L362 |
+----------------------+--------------------+-------------------------------------------+
Forbidden Formats (MUST Avoid):
❌ src/main/java/com/example/app/service/UserService.kt:335-356
❌ com.example.app.service.UserService
❌ - src/main/java/.../OrderService.java line 42
Full Contrast (Good vs. Bad):
+---------------------------------------------------+------------------------------------+
| ❌ Violation | ✅ Correct |
+---------------------------------------------------+------------------------------------+
| src/main/java/.../Scanner.java | Scanner.java:L80 |
| com.example.app.ApiOperation | Scanner |
| src/main/java/.../UserService.java:42-60 | UserService.java:L42-L60 |
| src/.../OrderService.kt:335-356 | OrderService.kt:L335-L356 |
+---------------------------------------------------+------------------------------------+
💡 Even if line numbers are provided, it's best to include a one-sentence explanation of what the code does so the reader can understand the intent without jumping.
📌 Rule Summary:
- Use filenames only; never include directory prefixes.
- Use the
Lprefix for line numbers (L42,L335-L356) to avoid ambiguity from bare numbers.- Use short names for classes:
UserCoreinstead ofcom.xxx.UserCore.- Paths occupying an entire line must also follow abbreviation rules without exception.
Emphasis on visual organization of information for clarity in non-code content like comparisons, workflows, and hierarchies.
⚠️ Priority Note: This Skill intentionally places ASCII tables before lists. In a terminal environment, monospaced fonts are naturally suited for aligned tables, making multi-dimensional comparison information much more readable in tables than in lists. This priority differs from general Markdown documentation standards and is a deliberate design for terminal scenarios.
🚫 Hard Prohibition: Markdown Table Syntax Terminal environments (like Codex CLI) cannot render Markdown tables (
| xxx | yyy |syntax). Unrendered Markdown tables look misaligned and have extremely poor readability in the terminal. In terminal dialogues, always use ASCII tables with+---+borders; Markdown table syntax is prohibited.
Presentation Priority:
Example:
+----------+-----------+-----------+-----------+
| Item | Plan A | Plan B | Plan C |
+----------+-----------+-----------+-----------+
| Name | Milk Tea | Coffee | Juice |
| Taste | Sweet | Bitter | Fresh |
| Refresh | Medium | High | Low |
| Time | Afternoon | Morning | All Day |
| Rating | 8/10 | 9/10 | 7/10 |
+----------+-----------+-----------+-----------+
├──, └──, │, →, ┌┐└┘, [Node], ●Example:
🔴 High Risk (Direct code modification/command execution)
├── execute_shell_command ← Arbitrary command execution, most dangerous
├── create_text_file ← Can overwrite files
🟡 Medium Risk (Add/Modify, but with certain control)
├── insert_after_symbol ← Add new code
└── switch_modes ← Mode switching might bypass limits
🟢 Low Risk (Knowledge management, no code modification)
├── write_memory ← Write to knowledge
└── onboarding ← Project analysis
## Header Syntax in Dialogues —— Terminal dialogues should use bold groupings. ## headers have too much visual weight and break the flatness of the dialogue flow.| xxx | yyy | syntax cannot be rendered in the terminal and displays as scattered pipe characters. Must use ASCII tables with +---+ borders.> quote block summary forces readers to read everything to grasp the point.The following provides two output examples conforming to this specification as references (generally within the 100-line limit):
Example 1: Business Issue Positioning and Code Modification (Short code + Diff, no absolute path restriction)
🎯 TL;DR The core issue is that the
login()method doesn't check for banned status. Recommended to add an interception check.
1️⃣ Missing Interception Logic Currently, login doesn't block banned users; it returns credentials directly after querying the database:
public String login(String username) {
User user = userRepo.findByUsername(username);
// ... Issue JWT directly
return jwtUtil.generate(user);
}
(See AuthServiceImpl.java:L45)
2️⃣ Fix Solution Recommended to add a status validation after fetching the user:
public String login(String username) {
User user = userRepo.findByUsername(username);
+ if (user.getStatus() == UserStatus.BANNED) {
+ throw new AuthException("Account is banned");
+ }
return jwtUtil.generate(user);
}
Example 2: Solution Comparison (ASCII Table and Tree Diagram)
🎯 TL;DR It's recommended to choose the pure Gateway-level interception solution.
1️⃣ Comparison of Two Solutions
+----------+------------+------------+
| Item | Traditional| Gateway |
+----------+------------+------------+
| Complexity| High | Low |
| Scope | Multi-mod | Gateway |
| Rating | 4/10 | 9/10 |
+----------+------------+------------+
2️⃣ Structure Changes Consolidate previously scattered designs into the Gateway:
Gateway Module (Gateway)
├── AuthFilter ← Unified Token Parsing
└── RateLimitFilter ← Single-point throttling
Example 3: Complex Process Analysis (ASCII Illustration)
🎯 TL;DR The asynchronous signaling process is difficult to explain clearly with pure text due to multiple state jumps. The following text flowchart shows the core flow.
1️⃣ State Flow Steps Verbal descriptions of handshake requests and async processing are confusing; look at this authentication and message delivery chain:
[ 📱 Client ]
│
▼ (1. POST initiates delivery)
[ 🛡️ Gateway API ]
│
├─▶ (2. Intercept: Returns 401 if Token invalid)
│
▼ (3. Assemble message body)
[ 📨 Delivery Execution ]
│
├─▶ (4. Async delivery processing) ──▶ [ Msg Queue ]
│
▼ (5. Return control immediately)
[ HTTP 202 Response to Client ]
2️⃣ Critical Nodes of the Chain As shown, the main feature is that the Gateway returns control immediately after step 5 (returning HTTP 202) without waiting for the message queue completion, greatly reducing perceived blocking for the client.